LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NiMax tasks vs tasks created in code which is faster?

Solved!
Go to solution

I am curious as to which is better to use, tasks created in NiMax or tasks created in code? If I'm going to acquire 8 analog channels is there a downside to creating the tasks in NiMax as far as speed is concerned? I know there is less code involved but what about the time it takes for labview to read the configuration file containing the tasks that are defined in NiMax? Would there be any significant advantage to doing it in code?

 

Thanks,

Bryan

0 Kudos
Message 1 of 5
(3,208 Views)

I have noticed little to no difference in speed between setting up the task in MAX vs in code.  I have not done any benchmarks.  I am just speaking strictly what I can perceive.

 

Tasks set up in MAX are simple to do.  You can test them with the MAX GUI.  But you also have to import your tasks into MAX when you do a deployment.

 

With code, you can define the channels however you want.  I like to use a configuration file.  Need to make a change?  Just open it up in a text editor and make the change.  That can be faster than MAX.

 

If Jeff decides to chime in, he will tell you to avoid using MAX defined tasks like the plague.


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
Message 2 of 5
(3,193 Views)

Even before you get to the deployment stage it is a good idea to back up your MAX configuration in case something goes wrong.

 

I'm a fan of making the task in MAX then generating code from that task if there isn't already an example that does what I want. 

Matt J | National Instruments | CLA
Message 3 of 5
(3,185 Views)
Solution
Accepted by topic author BryanSw

@BryanSw wrote:

I am curious as to which is better to use, tasks created in NiMax or tasks created in code? If I'm going to acquire 8 analog channels is there a downside to creating the tasks in NiMax as far as speed is concerned? I know there is less code involved but what about the time it takes for labview to read the configuration file containing the tasks that are defined in NiMax? Would there be any significant advantage to doing it in code?

 

Thanks,

Bryan


I'd go with the Third Option (which is the one I use) -- define the Task in the Project.  First, define the Task in MAX, make sure it does what you want and you are happy with it.  Then go into Project, New, DAQmx Task, and do it again, saving it in the Project.  Use the one in the Project, which "lives" with the Project and not with MAX.  If you need to tweak a parameter at run time, that's an excellent time to have a little code ...

 

Bob Schor

Message 4 of 5
(3,176 Views)

This is interesting, didn't know that.. I think I will try this because I have to deploy the app onto 3 laptops.

0 Kudos
Message 5 of 5
(3,157 Views)