% Class for controlling 4-channel Tektronix DPO scopes. % Tested with DPO4034, DPO3034 classdef MyDpo < MyTekScope methods (Access = public) function this = MyDpo(varargin) this@MyTekScope(varargin{:}); % 2e7 is the maximum trace size of DPO4034-3034 %(10 mln point of 2-byte integers) this.Comm.InputBufferSize = 2.1e7; %byte this.knob_list = lower({'GPKNOB1','GPKNOB2','HORZPos', ... 'HORZScale, TRIGLevel','PANKNOB1','VERTPOS', ... 'VERTSCALE','ZOOM'}); end end methods (Access = protected) function createCommandList(this) addCommand(this, 'channel',':DATa:SOUrce', ... 'format', 'CH%i', ... 'info', 'Channel from which the trace is transferred', ... 'value_list', {1, 2, 3, 4}); addCommand(this, 'ctrl_channel', ':SELect:CONTROl', ... 'format', 'CH%i', ... 'info', 'Channel currently selected in the scope display', ... 'value_list', {1, 2, 3, 4}); addCommand(this, 'point_no', ':HORizontal:RECOrdlength', ... 'format', '%i', ... 'info', 'Numbers of points in the scope trace', ... 'value_list', {1000, 10000, 100000, 1000000, 10000000}); addCommand(this, 'time_scale', ':HORizontal:SCAle', ... 'format', '%e', ... 'info', 'Time scale (s/div)'); addCommand(this, 'trig_lev', ':TRIGger:A:LEVel',... 'format', '%e', ... 'info', '(V)'); addCommand(this, 'trig_slope', ':TRIGger:A:EDGE:SLOpe', ... 'format', '%s', ... 'value_list', {'RISe','FALL'}); addCommand(this, 'trig_source', ':TRIGger:A:EDGE:SOUrce', ... 'format', '%s', ... 'value_list', {'CH1','CH2','CH3','CH4', ... 'AUX','EXT','LINE'}); addCommand(this, 'trig_mode', ':TRIGger:A:MODe', ... 'format', '%s', ... 'value_list', {'AUTO', 'NORMal'}); addCommand(this, 'acq_state', ':ACQuire:STATE', ... 'format', '%b',... 'info', 'State of data acquisition by the scope'); addCommand(this, 'acq_mode', ':ACQuire:MODe', ... 'format', '%s', ... 'info', ['Acquisition mode: sample, peak ' ... 'detect, high resolution, average or envelope'], ... 'value_list',{'SAMple', 'PEAKdetect', 'HIRes', ... 'AVErage', 'ENVelope'}); % Parametric commands for i = 1:this.channel_no i_str = num2str(i); addCommand(this,... ['cpl',i_str],[':CH',i_str,':COUP'], ... 'format', '%s', ... 'info', 'Channel coupling: AC, DC or GND', ... 'value_list', {'DC','AC','GND'}); % impedances, 1MOhm or 50 Ohm addCommand(this,... ['imp', i_str], [':CH', i_str, ':IMPedance'],... 'format', '%s', ... 'info', 'Channel impedance: 1 MOhm or 50 Ohm', ... 'value_list', {'MEG', 'FIFty'}); % Offset addCommand(this, ... ['offset',i_str], [':CH',i_str,':OFFSet'], ... 'format', '%e', ... 'info', '(V)'); addCommand(this, ... ['scale',i_str], [':CH',i_str,':SCAle'], ... 'format', '%e', ... 'info', 'Channel y scale (V/div)'); addCommand(this,... ['enable',i_str], [':SEL:CH',i_str], ... 'format', '%b',... 'info', 'Channel enabled'); end end end end