Hello,
I am having a hard time to implement to following scheme using the NI-DAQmx C API on a 6289 M Series Card.
Here's the story:
1. In order to have a syncronized AO and AI I create two corresponding tasks, where the output task is bound to the "Onboard Clock", wheras the input task is timed by the "SampleClock". The sampleMode is DAQmx_Val_FiniteSamps for both.
2. After starting both Task Clocks the syncronized DAQ is initiated by a call to DAQmxReadAnalogF64.
3. Now the intention is to aquire the samples until a analog input trigger level is reached, which shoud stop the aquisition task and the AO task and return the number of so far aquired samples (sampsPerChanRead) so they can be extracted from the readArray.
The closest solution I found so far from searching this forum and the docs, was to use a pause trigger. The problem with this solution seems to be that is doesn't stop the task but only pauses it.
Any advice on how to implement a solution for this problem is highly appreciated. I just hope that I didn't miss the "obvious solution".
Thanks in advance
Peter