Hi,
I'm using NIDAQmx driver version 9.1.
For a 2 channel CompactDAQ AO device, and prior to starting the AO task:
If the buffer is pre-filled before registering events, we observe the pre-filled output data of channel 1 on channel 0 and vice versa.
If we register the events before pre-filling the AO buffers, we observe the output data goes to the correct channels.
The attached file is adapted from the NIDAQmx ANSI C example program "ContAcq-IntClk-EveryNSamplesEvent.c" to reproduce this issue.
This is a 10 seconds test program. It is designed to pre-fill an AO buffer with 5 seconds of DC data (1's to channel 0 and 2's to channel 1). After the 5 seconds are over the same data is going to the channels using the EveryNSamples callback. The example code illustrates that the pre-fill data expected for channel 0 goes to channel 1 (i.e. 2 volts instead of 1 volt on channel 0) and the data for channel 2 goes to channel 1 (i.e. 1 volt instead of 2 volts on channel 1) during the first 5 seconds. After all the pre-fill data is transferred, the channels start receiving the expected data on the correct channels.
This issue only happens if we register the events *after* pre-filling the AO buffers.
It goes away if we register the events *before* pre-filling the AO buffers.
This issue was observed with NI-9263 using NI cDAQ-9172
It did not happen with the NI USB-6218
Regards,
whemdan
The MathWorks