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