I am using Nidaq 6.9.2 with C (Borland C++ Builder 5).
I am trying to output waveforms on two AO channels while simultaneosly reading two Analog inputs.
I have set ND_OUTPUT_UPDATE to PFI_5 , my external update trigger source. This trigger source is also connected to the Gate of Ctr0 to generate a delayed pulse (using retriggerable pulse application) to trigger an anlog input scan across the input channels.
This works great for 1 output and a single or multiple input channels.
When I try two outputs I can't seem to get the output data buffer values to appear on the outputs. The buffer array has the output values for both outputs interleaved ( just like the input buffer values will be).
Looking at the input data it seems the output data is all being sent to AO_0 while AO_1 is idle. The output waveform never completes as it only gets halfway through the data before the input Scan gets all its readings done.
The buffer is only a short * (i16*), so the outputs must be interleaved, right? (Not two separate array's or two concatenated arrays, right?)
I use WFM_ClockRate( iDevice=1, whichclock=0, timebase=0, interval=0, mode=0) as part of the setup for the scan.
Are the DAC's all updated simultaneously on receiving the udate (PFI_5) signal? What controls the triggering of the individual output channels? The SCAN function for input has a sample ( data point to data point) and a scan ( sweep across channels) timebase.
I've had good luck with getting Nidaq to do what I want so far. Hope I can get help to solve this.
Thanks
Dave