classdef MyTekScope < MyScpiInstrument & MyDataSource & MyCommCont properties (SetAccess = protected, GetAccess = public) % List of the physical knobs, which can be rotated programmatically knob_list = {'GPKNOB1','GPKNOB2','HORZPos','HORZScale',... 'TRIGLevel','PANKNOB1','VERTPOS','VERTSCALE','ZOOM'}; end properties (SetAccess = immutable, GetAccess = public) channel_no = 4; % number of channels end methods (Access = public) function this = MyTekScope(varargin) end function acquireContinuous(this) writeCommand(this, ... ':ACQuire:STOPAfter RUNSTop', ... ':ACQuire:STATE ON'); end function acquireSingle(this) writeCommand(this, ... ':ACQuire:STOPAfter SEQuence', ... ':ACQuire:STATE ON'); end function turnKnob(this, knob, nturns) writeCommand(this, ... sprintf(':FPAnel:TURN %s,%i', knob, nturns)); end end methods (Access = protected) function createCommandList(this) addCommand(this,'channel',':DATa:SOUrce',... 'default',1,... 'format','CH%i',... 'info','Channel from which the data is transferred'); addCommand(this, 'ctrl_channel', ':SELect:CONTROl',... 'format','CH%i',... 'info','Channel currently selected in the scope display', ... 'default',1); addCommand(this, 'point_no', ':HORizontal:RECOrdlength', ... 'format', '%i', ... 'info', 'Numbers of points in the scope trace', ... 'value_list', {1000, 10000, 100000, 1000000, 10000000}, ... 'default', 100000); addCommand(this, 'time_scale', ':HORizontal:SCAle', ... 'format', '%e', ... 'info', 'Time scale (s/div)', ... 'default', 10E-3); addCommand(this, 'trig_lev', ':TRIGger:A:LEVel',... 'format', '%e', ... 'info', '(V)', ... 'default', 1); addCommand(this, 'trig_slope', ':TRIGger:A:EDGE:SLOpe',... 'default', 'RISe', 'value_list',{'RISe','RIS','FALL'},... 'format','%s'); addCommand(this, 'trig_source', ':TRIGger:A:EDGE:SOUrce',... 'default', 'AUX', 'value_list', {'CH1','CH2','CH3','CH4',... 'AUX','EXT','LINE'},... 'format','%s'); addCommand(this, 'trig_mode', ':TRIGger:A:MODe',... 'default', 'AUTO', 'value_list',{'AUTO','NORMal','NORM'},... 'format','%s'); addCommand(this, 'acq_state', ':ACQuire:STATE',... 'default',true,... 'format','%b',... 'info','State of data acquisition by the scope'); addCommand(this, 'acq_mode', ':ACQuire:MODe',... 'default', 'HIR', 'value_list',{'SAMple', ... 'PEAKdetect','HIRes','AVErage','ENVelope'},... 'format','%s',... 'info',['Acquisition mode: sample, peak detect, ',... 'high resolution, average or envelope']); % Parametric commands for i = 1:this.channel_no i_str = num2str(i); addCommand(this,... ['cpl',i_str],[':CH',i_str,':COUP'],... 'default','DC', 'value_list', {'AC','DC','GND'},... 'format','%s',... 'info','Channel coupling: AC, DC or GND'); % impedances, 1MOhm or 50 Ohm addCommand(this,... ['imp',i_str],[':CH',i_str,':IMPedance'],... 'default','MEG', 'value_list', {'FIFty','MEG'},... 'format','%s',... 'info','Channel impedance: 1 MOhm or 50 Ohm'); % Offset addCommand(this,... ['offset',i_str],[':CH',i_str,':OFFSet'],'default',0,... 'format','%e',... 'info','(V)'); addCommand(this,... ['scale',i_str],[':CH',i_str,':SCAle'],'default',1,... 'format','%e',... 'info','Channel y scale (V/div)'); addCommand(this,... ['enable',i_str],[':SEL:CH',i_str],'default',true,... 'format','%b',... 'info','Channel enabled'); end end end end