LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TC01 Timing

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 4
(2,951 Views)
Solution
Accepted by topic author Denis.Vashuk

Hi Denis,

 

yes.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,942 Views)

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). 

0 Kudos
Message 3 of 4
(2,846 Views)

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. 

Download All
0 Kudos
Message 4 of 4
(2,832 Views)