LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing

My application takes twice as long as I want. Is
there any report or article on "methods to lower execution time"? Some
hints and recommendations, for instance, might be listed somewhere for
this purpose.

Fermiguy
0 Kudos
Message 1 of 9
(3,785 Views)
Post your code so we can look at it.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 9
(3,775 Views)
If you posted your code, I am sure people would be glad to offer pointers

Here is a profiling App Note:
http://zone.ni.com/devzone/conceptd.nsf/webmain/732CEC772AA4FBE586256A37005541D3

A search on 'Optimizing' on the Developer Zone yielded 100's of hits, here's a few:

http://zone.ni.com/devzone/learningcenter.nsf/webmain/D4708BC2F1E4100586256C2C00505344

http://zone.ni.com/devzone/learningcenter.nsf/webmain/5E017F18A8D3FCEA86256EE80056C707

http://zone.ni.com/devzone/learningcenter.nsf/webmain/1B36040AF878870786256CBC006FE314

Happy reading
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 9
(3,772 Views)
It is a huge code with many sub-VI's, DLL's etc.
I am looking for suggestions like: Use reference node, not local variables, or, do not us eproperty node for changing colors...

Fermiguy
0 Kudos
Message 4 of 9
(3,769 Views)
Like 2x faster CPU, more RAM, faster graphics, faster hard drive?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 9
(3,768 Views)
Using property nodes is much slower than local variables. There are ways to optimize the use of arrays. Instead of building an array within a loop, it is quicker to initialize an array before the loop and then use replace array subset within the loop. If using DAQ functions or serial functions, instead of using high level easy functions, use lower level functions so you can configure once, then read/write inside a loop. We recently found out that type casting is slow.
If you give us a clue as to what you are doing or what functions you are using, we might be able to help you better.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 9
(3,762 Views)
Use Tools»Advanced»Profile VIs to look at Vi and sub-vi execution and memory overhead. Suggest looking at that 1st link I posted, it tells you what you are asking for in terms of steamlining you code

http://zone.ni.com/devzone/conceptd.nsf/webmain/732CEC772AA4FBE586256A37005541D3
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 9
(3,758 Views)
I just printed the note about efficient use of memory etc.
Thanks.
0 Kudos
Message 8 of 9
(3,754 Views)


@tbob wrote:
Using property nodes is much slower than local variables. There are ways to optimize the use of arrays. Instead of building an array within a loop, it is quicker to initialize an array before the loop and then use replace array subset within the loop. If using DAQ functions or serial functions, instead of using high level easy functions, use lower level functions so you can configure once, then read/write inside a loop. We recently found out that type casting is slow.
If you give us a clue as to what you are doing or what functions you are using, we might be able to help you better.


Thanks for the suggestions.
I am communicating with the serial port to a homemade card to read various analog signals, set/read tem for a Peltier Cooler, open close some switches (water and gas flows) and bunch of plots.

Fermiguy
0 Kudos
Message 9 of 9
(3,752 Views)