09-19-2016 09:28 AM
Hello,
I am trying to read temp from a TC01 along with other faster logging devices. I am using the Analog 1D DBL 1 Chan 1 Samp instance in DAQmx Read VI with the timeout set to 0 inside the same loop I have my faster reading VIs. I was hoping to get an error when requesting data faster than 4 S/s so it would not bog down the rest of my program but DAQmx Read VI is just waiting for the samples to come in at 4 S/s. Do I have to place the DAQmx Read VI in a separate loop?
Thanks,
Denis
Solved! Go to Solution.
09-19-2016 09:34 AM
09-20-2016 08:34 AM
There are other options too. You can have an elapsed timer like function, that only reads from that sensor if so much time has gone by and still have it in the same loop. You can also perform a read on 1 Channel N samples, and set the N to 1 and set the timeout to 0. Then your Read will wait 0 seconds to get 1 sample. If it isn't there then it will timeout and no data will be returned (and an error will come out that you can clear if this is expected).
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-20-2016 11:00 AM
I ended up doing the timing option. I would rather have used the timeout-error option but I couldn't get it to generate an error. I have attached both VIs and I would appriciate any feedback on both (I'm new to this). The my timeout version in inside a loop for debuging only.