11-30-2011 11:08 PM
I use NI9265 as output and NI9205 as input. Now I want to make the two moduls start working strickly simultaneously since that is the requirement of my experiment. So I build the following VI.
After running this VI, it shows:
Error -200462 occurred at DAQmx Start Task.vi:1
Generation cannot be started because the output buffer is empty.
Write data before starting a buffered generation. The following actions can empty the buffer: changing the size of the buffer, unreserving a task, setting the Regeneration Mode property, changing the Sample Mode, or configuring retriggering.
I actually didn't do anything on the buffer. So could anyone help me deal with this tricky problem?
12-01-2011 12:56 PM
The error comes up because you Start the AO Task (using DAQmx Start Task.vi) before you write the Samples to the Modules buffer (8192 Samples per default) using DAQms Write.vi. You have to write the values before you start the Task.
At the other hand they don't start simultaneously! You have to start the AO Task before you start the AI Task, which generates the timebase for the AO Task.
Have a look at the sychronization examples using the Example Finder (LabVIEW>Help>Find Examples)
They refer to M-Series devices but should behave the same with your cDAQ Chassis.
Christian
12-01-2011 01:12 PM
Hello Stephen250, Hope you are doing great!
Definitely the error you are getting is expected due to the program set-up implemented in the code.
When trying to read and write from different modules/channels we definitely would like data to be presented to the buffer before reading this data, in this case there is not something defining which tasks starts first so there is the possibility the reading task is executing before data is written to it.
Another thing I noticed in the code is that the start task VI should be located after the write VI so you start the task after the writing parameter have been set.
You can take a look at the Multi Function Synch Analog Input-Analog Output VI example located in the example finder for LabVIEW.
In order to see this example in LabVIEW, go to> Help> Find Examples...>Hardware Input and Output> DAQmx> Multifunction.
Regards,
Luis A.
Applicatins Engineer.
National Instruments.
03-20-2018 02:16 AM
The example VI you just posted does not exist.
03-20-2018 05:41 PM