returns 3 for time_units (instead of 2). The error is not 100% reproducible, but rather frequent one. I'm using Picoscope 3224 and latest R5.xx software
---
Best regards,
Serg
The function will return 0 if it has failed and a non zero value if it has passed. So the number does not matter as long as its not a zero when it passes.
The function will return 0 if it has failed and a non zero value if it has passed. So the number does not matter as long as its not a zero when it passes.
Hope this helps.
The bug report was about time_units out value, not about the function result. I just want to know will you fix it or I must write my own workaround - no problem really.
---
Best regards,
Serg
Here are the argument descriptions from the PS3000 manual:
time_interval, a pointer to the time interval, in nanoseconds, between readings at the selected timebase. If a null pointer is passed, nothing will be written here.
time_units, a pointer to the most suitable units that the results should be measured in. This value should also be passed when calling ps3000_get_times_and_values(). If a null pointer is passed, nothing will be written here.
I think the confusion has arisen because the time_interval is always measured in ns. The time_units are the highest precision units that the times can be returned in (from ps3000_get_times_and_values()) without overflowing a ULONG.
Eg: given your parameters, time_interval is 25,600ns. Multiplying this by 262,144 samples gives a collection time of 6,710,886,400ns. The maximum collection time in ns that you can express in a ULONG is 4,294,967,296ns. The function therefore returns us as the most suitable time unit.