LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Application Issue - Timing

Hello,

 

Below is a snippet of code that runs as part of the startup executable on my crio 9045. This should take 5 seconds to complete, 10000 sample/sec * 5= 50000. When testing, I display any errors I receive back to the host computer through a shared variable, but I have seen no errors. My issue is that the code completes almost as soon as it gets called when it should take 5 seconds.

FlyingSquirrel123_1-1720554113674.png

I haven't used shared variables before so I am not sure if that would have anything to do with execution timing.

 

I know it only takes a split second to execute as I put this VI as part of a state machine that displays (among other things) if it is running this code or not.

 

If anyone has any input that would be greatly appreciated

 

0 Kudos
Message 1 of 3
(282 Views)

Hi squirrel,

 

where do you define the number of samples in your finite task?

Best regards,
GerdW


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

Look at the DAQmx Timing function, where you specify Finite Sampling and accept the default number of 1000 samples (since you didn't wire the much larger number of samples you really want to take).

 

Bob Schor

0 Kudos
Message 3 of 3
(216 Views)