Moku Delta MATLAB API

Hi,

I am trying to capture the frequency measurement of the Phasemeter from MATLAB API. But problem is for some random intervals acquistions slow down and the polling freezes, this leaves unequal and randomized sampling intervals in my data. I attached the code below, and I would appreciate any help on this. Is there a more efficient way to sample a measurement of an instrument into MATLAB?

I am usıng the instrument “pm” as Phasemeter and in a while loop acquire the measuremen tby .get_data()

while True

…

try

        pmData = pm.get_data();

end

end

Hello @alkmbozkurt ,

Thank you for reaching out to Liquid Instruments! I would recommend to stream the data live, rather than use get_data(). The streamer uses a buffer to ensure that no points are missed and that they have consistent timing between samples. I have attached a basic MATLAB example to this reply. This should be a good starting point for configuring the system. I hope this helps!

-Dylan

phasemeter_streaming.m (3.3 KB)