How do I code to grab the waveform of Lecroy oscilloscope waiting till the trigger pulse?

4 views (last 30 days)
function waveform_read
% Create a TCPIP object.
interfaceObj = instrfind('Type', 'tcpip', 'RemoteHost', '169.254.66.12', 'RemotePort', 1861, 'Tag', '');
% Create the TCPIP object if it does not exist
% otherwise use the object that was found.
if isempty(interfaceObj)
interfaceObj = tcpip('169.254.66.12', 1861);
else
fclose(interfaceObj);
interfaceObj = interfaceObj(1);
end
set(interfaceObj,'InputBufferSize',30000);
% Create a device object.
deviceObj = icdevice('lecroy_8600a.mdd', interfaceObj);
% Connect device object to hardware.
connect(deviceObj);
% Disconnect device object from hardware.
%disconnect(deviceObj);
% Configure property value(s).
set(interfaceObj, 'Name', 'TCPIP-169.254.66.12');
% Disconnect device object from hardware.
%disconnect(deviceObj);
set(interfaceObj, 'RemoteHost', '169.254.66.12');
% Start Timer
n=2
t=0;
% Execute device object function(s).
pause(n)
a=t+1
b=10
c=mod(a,b)
groupObj = get(deviceObj, 'Waveform');
groupObj = groupObj(1);
[X,Y] = invoke(groupObj, 'readwaveform', 'channel1');
figure(1)
plot(Y,X)
I have this code which just grabs the data of my oscilloscope whatever is there on the screen, I need help to edit this one to get a infinite loop which waits for a trigger to get the waveform instead of grabbing every information on the screen. I want to store the trigger time, and the maximum phase value of the waveform obtained at each time of trigger. I want the data for 10s, so the time should be mod time ( ex: if time is 11 its mod value is 1, for 22 its 2). I want each maximum values updated denoting the points on the phase graph. and waveform at each trigger time. Please help.

Answers (1)

Nivedya Poovathody
Nivedya Poovathody on 29 Jun 2022
Could you share if you found a solution for instantaneous acquiring of signal with trigger event? it will be really helpful for me.

Categories

Find more on Manage Products in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!