LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AO Task is Done despite running generation

I check with Task is Done successfully if a Task was already started for AI and DO tasks. However, an started AO task, without timing configuration returns immediately after start: task is done, despite the hardware is generating at that moment. A following start returns an error, since it is already running. Yes, what a beauty. 

 

Ok, how can I retrieve the running status without clearing errors?

 

0 Kudos
Message 1 of 5
(94 Views)

If you call DAQmx Start VI, the task is running when that VI is done executing and returns no error.

-------------------------------------------------------
Control Lead | Intelline Inc
Message 2 of 5
(64 Views)

 


... However, an started AO task, without timing configuration returns immediately after start: task is done, despite the hardware is generating at that moment.

What is the default ao timing for your device? That default might explain how you can have a task where Task is Done returns and the hardware is still generating.

 

This reference doesn't go into enough detail for task types like hardware-timed single point, but at least it indicates that we might expect different behaviors for different timing configurations. This reference describes the DAQmx task state model. I also wish there was a direct way to query the driver for the current state of the task.

Doug
NI Sound and Vibration
0 Kudos
Message 3 of 5
(53 Views)

@ZYOng wrote:

If you call DAQmx Start VI, the task is running when that VI is done executing and returns no error.


I was referring to the 'Is Task Done.vi' which returns true despite the started hardware still generating voltage.

 

I am using 9264

 

There is this kb https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000gO3kCAE&l=de-DE

describing a solution calling s library, which is OKish, BUT I need that for RT linux (cRIO)

Can someone verify that not configuring timing is the same as 'Simultaneous Analog Output Enable'?

0 Kudos
Message 4 of 5
(45 Views)

@Quiztus2 wrote:

@ZYOng wrote:

If you call DAQmx Start VI, the task is running when that VI is done executing and returns no error.


I was referring to the 'Is Task Done.vi' which returns true despite the started hardware still generating voltage.


NI hardware keeps the last value even when the task is cleared. You need to write a 0 value explicitly to let it "stop generating voltage". See How Can I Reset to Zero My Analog Output Value After I Stopped My Application?

 

What are you trying to monitor? Perhaps you want to use Wait Until Done VI instead? 

Difference Between the DAQmx Wait Until Done VI and Daqmx Is Task Done VI

-------------------------------------------------------
Control Lead | Intelline Inc
Message 5 of 5
(19 Views)