LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Are DAQ Assistant Calls performance expensive?

Does the DAQ Assistant call create and close say a task everytime its called? Therefore should I not constantly be calling it in a loop to get temperature readings?

0 Kudos
Message 1 of 5
(2,522 Views)

It might depend on the way it is set up.

 

If you right click on the DAQ assistant and choose Open Front Panel, it will convert it to a subVI.  You can open that up and look at the underlying code to see how it is working.

Message 2 of 5
(2,510 Views)

It is generally better to use the actual DAQmx API.  This way you can setup the task once before your loop, read as much as you want inside of the loop, and close once after the loop.  I would consider the DAQ Assistant preformance expensive.  But it really does depend on your application.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,501 Views)

Yes, thanks for this.  I looked and they do create and clear so I will use the API.

0 Kudos
Message 4 of 5
(2,498 Views)

Actually I think the DAQ Assistant is a little smarter than the code it generates when you convert it to code.  For continuous tasks I believe it will create and commit your task on the first iteration of the loop and then leave it open for subsequent iterations, only closing it when the "Stop" input is written true or the calling VI goes idle.

 

For single-point or finite acquisitions the task will be closed on every iteration unless you wire false into the the "Stop" input (normally you would use whatever value is stopping the loop to also stop the task).

 

Using the lower-level API is also a safe bet.

 

~Simon

0 Kudos
Message 5 of 5
(2,474 Views)