So I was playing around withe the provided DAQmx module and kept getting error -200227.
I tracked it down to runtim.lvclass:Configure AI Task.vi
The offset is set to '-1'. Setting it to '0' fixes the problem.
I don't quite know how this could be missed...?
Hi Nick, that change was made in this pull request:
And was aiming to solve this issue: https://github.com/LabVIEW-DCAF/DAQModule/issues/53, the issue is still open but we haven't fix it yet.
What hardware are you using?
Ah I see.
This is on a 9133 RT cDAQ.
Rather than a for loop as suggested by agomez08, could just add a wait between the start and setting that property?
I attempted a wait with no success. I don't think this is the problem anyway as read will report -200277 on every iteration. No amount of waiting will let DAQmx read without error. Its more like for this device an offset of '-1' is simply not supported.
A keep it simple solution might be to just read all available samples and only use the latest one:
That looks like a good approach, we just need to check that we don't get the delay or the error when doing that.