python PS5444D MSO streaming mode, time discrepancy

Post general discussions on using our drivers to write your own software here
Post Reply
ice-stg
Newbie
Posts: 0
Joined: Wed Jun 02, 2021 8:39 am

python PS5444D MSO streaming mode, time discrepancy

Post by ice-stg »

Hi,

I want to take data (MSO-port) for long times and started to modify the "ps5000aStreamingExample" from the git repositry. So far I got no error messages and the taken date look correct. BUT if I calculate the time to take the data (by multiplying "totalSamples" with "actualSampleIntervalNs") I get a longer time than the actual measurement take. Is their something wrong in the calculation (it is just sample-intervall times the number of samples)?

Is their a way to get a flag or something similar to check if data loss occures in streaming mode? So far I connect the port D0 to the probe compensation port (@ 1 kHz) and measure the time for one period. If that time changes a lot a data loss occured.

A full example code is attached.

Thanks in advance.
Attachments
ps5000aStreamingExample_SK.py
(8.58 KiB) Downloaded 242 times

bennog
Advanced User
Advanced User
Posts: 208
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: python PS5444D MSO streaming mode, time discrepancy

Post by bennog »

I don't have experience with python but it looks like you are sampling at 1MS/sec and you are doing some calculations digital channel splitting in the callback function.

I probably step on someone's toes but python is not fast enough to do the splitting and copying you seem to do in the callback.

Can you check by only copy the data in the call_back and nothing more.

also test a a lower sample rate say 500kS/sec

Benno

ice-stg
Newbie
Posts: 0
Joined: Wed Jun 02, 2021 8:39 am

Re: python PS5444D MSO streaming mode, time discrepancy

Post by ice-stg »

Thanks for the reply.
I will double check with low sample rate. However the strange thing is the measurement should take 20 s ("total samples" * "number of samples") but the time it takes is only 17 s ("measured" by taking the system time before and after the measurement).

ice-stg
Newbie
Posts: 0
Joined: Wed Jun 02, 2021 8:39 am

Re: python PS5444D MSO streaming mode, time discrepancy

Post by ice-stg »

Ok, found my error. I started the timing of the aquistion after I started the actual measurement.

Still my second question remains. Is their a way to check for data loss in streaming mode?

Post Reply