07-09-2024 02:53 PM
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.
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
07-09-2024 03:15 PM
07-11-2024 04:37 AM
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