diff --git a/OOequipment/Waveform.mlx b/OOequipment/Waveform.mlx index 23c62c4..5254c1c 100644 Binary files a/OOequipment/Waveform.mlx and b/OOequipment/Waveform.mlx differ diff --git a/OOequipment/subfiles/Oscilloscope.m b/OOequipment/subfiles/Oscilloscope.m index 656e694..319c111 100644 --- a/OOequipment/subfiles/Oscilloscope.m +++ b/OOequipment/subfiles/Oscilloscope.m @@ -132,7 +132,8 @@ classdef Oscilloscope < Equipment end function messageclose(sc) - sc.write('DISP:DIAL:CLOS'); + sc.opc; + sc.write_unsafe('DISP:DIAL:CLOS'); end diff --git a/OOequipment/subfiles/Trigger.m b/OOequipment/subfiles/Trigger.m index efd3a3c..03be68c 100644 --- a/OOequipment/subfiles/Trigger.m +++ b/OOequipment/subfiles/Trigger.m @@ -13,6 +13,7 @@ classdef Trigger slope level coupling + hfreject end methods @@ -40,6 +41,10 @@ classdef Trigger s = tr.gettrig('EDGE:COUP?'); end + function s = get.hfreject(tr) + s = tr.gettrig('EDGE:FILT:HFR?'); + end + function tr = set.mode(tr,string) tr.settrig(['mode ',string]); end @@ -60,6 +65,10 @@ classdef Trigger tr.settrig(['EDGE:COUP ',string]); end + function tr = set.hfreject(tr,string) + tr.settrig(['EDGE:FILT:HFR ' string]); + end + end diff --git a/OOequipment/subfiles/Waveform_script.m b/OOequipment/subfiles/Waveform_script.m index ec94191..ec008de 100644 --- a/OOequipment/subfiles/Waveform_script.m +++ b/OOequipment/subfiles/Waveform_script.m @@ -1,6 +1,33 @@ oscilloscope.run; functiongenerator.frequency = frequency; functiongenerator.voltage = amplitude; +functiongenerator.waveform = waveform; +oscilloscope.trigger.source='ch1'; +oscilloscope.trigger.hfreject = 'on'; +clear ax; oscilloscope.auto; wave = oscilloscope.waveform; - +T = wave.sampletime; +t = (0:T:T*(wave.length-1))*1000; +ch1 = wave.ch1; +ch2 = wave.ch2.*attenuation; +figure; +plot(t,ch1,t,ch2); +title('Waveforms from Oscillscope') +legend('Channel 1','Channel 2'); +xlabel('Time [ms]'); +ylabel('Amplitude [V]'); +ax(1) = gca; +figure; +ax(2) = subplot(2,1,1); +plot(t,ch1) +xlabel('Time [ms]'); +ylabel('Amplitude [V]'); +title('Channel 1 from Oscillscope') +ax(3) = subplot(2,1,2); +plot(t,ch2) +xlabel('Time [ms]'); +ylabel('Amplitude [V]'); +title('Channel 2 from Oscillscope') +linkaxes(ax(2:3)); +arrayfun(@(x) set(x,{'XGrid','YGrid'},{'on','on'}),ax)