Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

?writeanalog function usb 6009 supports autostart=null

I get this error when trying toset the autostart parameter to null  in the function DAQmxWriteAnalogF64:
 
RuntimeError: nidaq call failed with error -200846: 'Write cannot be performed w
hen the auto start input to DAQmx Write is false, task is not running, a'
 
Does the USB 6009 device support not autostarting writing? If it does how do I implement such a thing without getting this runtime error?
0 Kudos
Message 1 of 4
(3,559 Views)
What kind of analog generation are you trying to do? Single data generation, multiple finite generation or multiple continuous generation? When you write false for autostart, you need to use the DAQmx Start Task method to arm the task.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 4
(3,543 Views)
Single finite write with a view to possibly multiple finite write. How the code tries to work now is that I call the DAQmxWriteAnalogF64 function, which throws an error if autostart is not enabled. I'm trying to call the start task function after this to get it to begin to write, is this not how the null autostart parameter was designed to operate? If so can you correct me?
0 Kudos
Message 3 of 4
(3,536 Views)

If you are doing a single finite write, the sequence should be:

DAQmx Create Channel

DAQmx Write with autostart set to true (default for one sample finite write)

DAQmx Clear Task

 

If you are doing multiple finite write, the sequence should be:

DAQmx Create Channel

DAQmx Timing to setup timing

DAQmx Write with autostart set to false

DAQmx Start Task

DAQmx Wait Until Done

DAQmx Clear Task

 

 

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 4
(3,534 Views)