classdef Oscilloscope < Equipment %OSCILLOSCOPE Summary of this class goes here % Detailed explanation goes here properties nchannels horizontalPosition timescale ch1 ch2 ch3 ch4 trigger acquisition end methods function sc = Oscilloscope(ipAddress,port,nchannels) %OSCILLOSCOPE Construct an instance of this class % Detailed explanation goes here sc@Equipment(ipAddress,port,-1); sc.trigger = Trigger(sc); for i = 1:nchannels sc.(['ch',num2str(i)]) = Channel(sc,i); end end % function data = waveform(ch,cha) % ch.scope.clear; % ch.scope.write('CHAN1:TYPE HRES'); % ch.scope.write('FORM REAL'); % ch.scope.write('FORM:BORD MSBF'); % ch.scope.write('CHAN1:DATA:POIN DEF'); % ch.scope.write('SING'); % header = str2num(ch.scope.query('CHAN1:DATA:HEAD?')); % ch.scope.write_unsafe('CHAN1:DATA?'); % prefixstring = fscanf(ch.scope.tcp,'%c',2); % prefixlength = str2double(prefixstring(2)); % datalength = fscanf(ch.scope.tcp,'%c',prefixlength); % data = fread(ch.scope.tcp,header(3),'float'); % flushinput(ch.scope.tcp); % end end end