% Control class for Tektronix MDO scopes, tested with MDO3034 classdef MyTekMdo < MyTekScope methods (Access = public) function this = MyTekMdo(varargin) P = MyClassParser(this); processInputs(P, this, varargin{:}); this.channel_no = 4; this.knob_list = lower({'GPKNOB1', 'GPKNOB2', 'HORZPos', ... 'HORZScale', 'TRIGLevel', 'PANKNOB1', 'ZOOM', ... 'VERTPOS1', 'VERTPOS2', 'VERTPOS3', 'VERTPOS4', ... 'VERTSCALE1', 'VERTSCALE2', 'VERTSCALE3', 'VERTSCALE4'}); connect(this); % 2e7 is the maximum trace size of MDO3034 %(10 mln point of 2-byte integers) this.Comm.InputBufferSize = 2.1e7; %byte createCommandList(this); 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, 5000000, ... 10000000}); addCommand(this, 'time_scale', ':HORizontal:SCAle', ... 'format', '%e', ... 'info', 'Time scale (s/div)'); addCommand(this, 'trig_lev', ':TRIGger:A:LEVel',... % debug 'format', '%e', ... 'info', '(V)'); addCommand(this, 'trig_slope', ':TRIGger:A:EDGE:SLOpe', ... 'format', '%s', ... 'value_list', {'RISe', 'FALL', 'EITHer'}); addCommand(this, 'trig_source', ':TRIGger:A:EDGE:SOUrce', ... 'format', '%s', ... 'value_list', {'CH1', 'CH2', 'CH3', 'CH4', ... 'AUX', 'LINE', 'RF'}); 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', 'DCREJect', 'AC'}); % impedances, 1MOhm or 50 Ohm addCommand(this,... ['imp', i_str], [':CH', i_str, ':TERmination'], ... 'format', '%e', ... 'info', ['Channel impedance: 50 Ohm, ' ... '75 Ohm or 1 MOhm'], ... 'value_list', {50, 75, 1e6}); % 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