I am attempting to simultaneously acquire multiple analog inputs (@ 1kHz) and control digital outputs. I am having trouble getting these two operations synchronized, and could use some feedback. A few details about my application requirements:
1) I must have a calibration loop (left while loop in my VI) for calibrating transducers attached to the analog inputs. The refresh rate on this does not have to be extremely fast.
2) Upon depression of the "Fire" button, the DAS needs to begin acquisition for a user-specified amount of time at a high rate (1kHz). This may include up to 12 analog channels (which creates a throughput bottleneck at the USB protocol level for realtime stuff -- buffering is required, I think).
3) During the acquisition process, the VI also needs to be able to control digital outputs for controlling events. The timing of these events is handled in the left-hand loop in my VI.
I have had problems getting the two channels synchronized (I think that's been fixed for the version I'm posting here). Now, I am having problems getting the digital output to write to the hardware port. I can display the data being sent to the write block within the timed loop (chart output on frontpage), but an oscilloscope reveals, alas, no actual outputs on the digital port. When I run the VI, I get the following error message:
>Error -200462 occurred at DAQmx Start Task.vi:1
Possible reason(s):
Measurements: Generation cannot be started, because the output buffer is empty.
Before starting a buffered generation, write data. Unreserving a task empties the buffer. Changing the size of the buffer or setting the Regeneration Mode property will result in the buffer being unreserved and emptied.
Task Name: _unnamedTask<7>
Any feedback on this topic would be greatly appreciated. Thank you!