09-24-2020 05:25 PM
I've been following this (https://www.youtube.com/watch?v=NMMRbPvkzFs) video to use the python nidaqmx module to collect TC measurements with a cDAQ-9172 chassis and 9211 card.
The following code is directly from the video (except I'm using my own DAQ):
with nidaqmx.Task() as task:
task.ai_channels.add_ai_thrmcpl_chan("cDAQ1Mod3/ai3")
while i < 30:
data = task.read()
print(data)
This prints out temperature values like this:
24.983256110305593
Does any one know if there is built in support via the module to round the collected data point down to 24.98? I can do this downstream if really need be, but I am specifically interested in knowing if I can record data points at 2 decimal places with the nidaqmx module instead.
thanks!
10-01-2020 02:02 PM