Determine / Change Sample Rate | LabJack
 

Determine / Change Sample Rate

2 posts / 0 new
Last post
mathenym
mathenym's picture
Determine / Change Sample Rate

I am trying to determine/change the sample rate of the d.getTemperature() call. Is there a way to do this? 

Can it also be done when I change to other analog inputs? 

thanks.

LabJack Support
labjack support's picture
Command-response times are

Command-response times are documented here in the U3 datasheet:

https://labjack.com/support/datasheets/u3/operation/command-response

getTemperature has comparable times to 1 analog input execution times with QuickSample and LongSettling options set to 0 (off). Documented times are fastest on average, and can depend from system to system.

We provide the u3allio.py example which can be used for timing functionality. Modify the "while < numIterations" loop with the function/functions you want to get the average execution time of.

If you need to slow down the sample rate, you can use software delays such as time.sleep between calls. Analog input sample times will depend on QuickSample and LongSettling settings, along with how many analog inputs you are reading. The command-response documentation linked to earlier documents this further.  For minimizing USB communication packets needed (command-response), perform multiple analog input commands in one getFeedback call.