Hi Blue,
you set a samplerate of 3S/s and request 180 samples. This will take 180S / 3S/s = 60s (yes, simple math!).
In "normal" execution mode you will most likely run into a TimeOut error of DAQmxRead because by default it will only wait for 10s. Is there any error message?
Suggestions:
- set a fixed number of samples at DAQmxRead. I recommend 1/10 of the sample rate (round to next positive integer)…
- rethink the sample rate and number of samples values
- usually you want to save all measurement data, so place the WriteFile function inside the loop.
- you can OR the stop boolean directly with the error output of DAQmxRead
Best regards,
GerdW
using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019