LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite digital measurement with DAQ timing

Hello. I want to make a code that measures finite digital signals using ni9423. What I was trying to make was a code that measures digital signals 10 times per second. I really want to use daq timing to measure every certain amount of time. But when I run the code, it only runs once and ends. Which part should I fix? Thank you.

Download All
0 Kudos
Message 1 of 5
(376 Views)

Just use while loop which will iterate every 100 ms - this will give 10 measurement per second:

meas.png

0 Kudos
Message 2 of 5
(364 Views)

Thank you for your kind reply, but if I turn the while loop with the other loop, there is a problem of delay than 100ms. Do you happen to know how to solve this?

0 Kudos
Message 3 of 5
(359 Views)

Hi Andrey,

 

most of the stuff shown in your image belongs outside the loop...

Best regards,
GerdW


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

And no wait in the loop needed.

the samplerate and number of points to read define the (min*) loop duration.

*) min, because depending on the other stuff you put into the loop.  (but you can look at the producer-consumer architecture if things get critical)

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(295 Views)