09-26-2025 12:44 PM
Decided to test this out in the file you mentioned and changing that offset to 0 seems to solve the issue while keeping my data rate at 10Hz. Appreciate you and Kevin for the information! I'm not sure if I can mark both of your comments as solutions but it was the offset he mentioned along with the configuration file you pointed out. Thank you!
09-26-2025 01:44 PM
Just to put a little button on things...
I can't look at any code here, but changing the Offset to 0 might have some side effects. If you have a tight reading loop, reading 1 sample offset by 0 from Most Recent will make DAQmx Read *wait* for up to 1/10 sec for the *next* 10 Hz sample to arrive.
The apparent *intended* behavior was to read 1 sample offset by -1 from Most Recent. After startup, this would *never* need to wait but would always immediately return the most recent *past* sample that has already arrived.
I'm educated guessing that your error happened at 10 Hz but not at 25 kHz because the first DAQmx Read is done immediately after starting the task. With a 10 Hz rate the first sample may not yet have arrived while with a 25 kHz rate it does.
So another way to restore the original behavior that returns *past* samples without erroring is to add a 1 sample DAQmx Read after starting the task, but *before* setting the Offset to -1. You can maybe discard this data, but this will at least guarantee that there will already be at least 1 sample in the buffer before you ever get to your regular reading loop.
-Kevin P
09-26-2025 02:05 PM
I think Kevin's right about the change in behavior. Depending on your requirements, that may or may not be important for this project though.
For configuring, I would think as long as your acquisition rate is higher than the loop rate of the DCAF engine then it would probably work.
09-30-2025 12:34 PM
I'll look into this and see what happens. Thank you
09-30-2025 12:34 PM
Where would you check the loop rate of the DCAF engine?
09-30-2025 02:05 PM
That should be an option when you select the engine itself in the configuration editor tree.