LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why generate NI-DAQmx code from DAQ assist ?

Solved!
Go to solution

If I configure an AI channel using DAQ assist why would I convert it using the Generate NI-DAQmx code from the menu? Does it run faster ? What is the advantage of converting ?

 

Dave

Message 1 of 4
(2,515 Views)

1:  Because you would prefer to know what your code is doing under the hood rather than just guessing and hoping it's right.

2:  It's a great way to learn.

3:  In most cases the "Wizards" generate safe code instead of efficient code so it often runs slower than it would if you optimized it.

4:  You will eventually move beyond what it can do for you automatically but it's still a good way to jump start your project.  (Same with modifying the NI example VIs.)

 

BTW, no doesn't run faster UNTIL/UNLESS you find a way to optimize it.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 4
(2,489 Views)
Solution
Accepted by topic author BGD

Also, you have more control over DAQmx code vs express VIs.  If you need to configure parameters that were not in the express VI, like exporting a trigger to cause another instrument to trigger, you could add code to do so. 

 

Finally, the express VI probably contains more functions than you actually need.  A lot of unnecessary code.  With DAQmx, you only put what you use.  No unnecessary functions wasting time.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 4
(2,478 Views)

Thanks for all the responses

0 Kudos
Message 4 of 4
(2,422 Views)