11-26-2012 11:53 PM
In the attached VI, I am getting the following error
Error -200547 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi
Possible reason(s):
Measurements: DAQmx Write failed, because a previous DAQmx Write automatically configured the output buffer size. The buffer size is equal to the original number of samples written per channel, so no more data can be written prior to starting the task.
Start the generation before the second DAQmx Write, or set Auto Start to true in all occurences of DAQmx Write. To incrementally write into the buffer prior to starting the task, call DAQmx Configure Output Buffer before the first DAQmx Write.
Task Name: _unnamedTask<9>.
In this the physical channel is a simulated device PCI-6251.
How can I rectify this error ??
11-27-2012 12:07 AM
You're configuring the Sample Clock with 500,000 samples at a rate of 1000 samples per second. How long will it take then to output all 500,000 samples?
Then look at your loop rate.
11-27-2012 12:35 AM
It will take 500 seconds for the output.
What do you mean by loop rate ??
When I made write.vi autostart to true, that error is gone. But I am getting another error.
11-27-2012 12:35 AM - edited 11-27-2012 12:45 AM
I am giving iterations as 10.
Maximum value of DAQ as 10 and minimum as 0.
11-27-2012 12:51 AM - edited 11-27-2012 12:57 AM
I stand corrected. The measurement task only starts automatically when doing a DAQ Read.
The DAQ Write will return immediately (while the data is transmitted). You need to wait until the samples are done before writing again. Try using a DAQ Wait Until Done after the Write.
What's the new error?
11-27-2012 01:01 AM
Error -200288 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi
Possible reason(s):
Measurements: Attempted to write a sample beyond the final sample generated. The generation has stopped, therefore the sample specified by the combination of position and offset will never be available.
Specify a position and offset which selects a sample up to, but not beyond, the final sample generated. The final sample generated can be determined by querying the total samples generated after a generation has stopped.
Attempted to Write Sample: 250000
Property: RelativeTo
Corresponding Value: Current Write Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<58>
11-27-2012 01:28 AM
I made some changes in the VI. Now it seems to be working properly.
Hope it is fine. Thanks for your help