labview >> What is the advantage of using For loop?

by rolfk » Sun, 29 May 2005 06:11:02 GMT

<br><blockquote><hr>Donald wrote:<br><blockquote><hr>altenbach wrote:<br>Anyone have a link?<br><hr></blockquote><br>I can?t find where I stuffed one of Greg McKaskle?s more detailed explanations (may have lost it during Y2K?), but way down in AppNote 168: <a href=" http://zone.ni.com/devzone/conceptd.nsf/webmain/732CEC772AA4FBE586256A37005541D3" target=_blank> LabVIEW Performance and Memory Management </a> ... p15 of the pdf ... there?s a paragraph that I needn?t quote because it just repeats what everyone has said above.<br><br>But if Thunderbird hasn?t read the AppNote already, it?s a worthwhile exercise.<br><hr></blockquote><br><br>If I remember correctly LabVIEW starts with some arbitrary array size for autoindexed array outputs on while loops such as a few hundred or thousend elements and everytime it runs out of elements that array is doubled in size. So a while loop will be slower than a for loop in any case as LabVIEW needs to do always at least one allocation (and you have to calculate a termination criteria inside the loop somehow too) and at the end one resizing but the performance hit is not that bad. Of course if you can, it is always a good idea to use for loops, even just for the benefit of not having to wire up a termination condition<br><br>Rolf Kalbermatter

Similar Threads

1. i am using labview with java,i am using datasocket ,but i...

i am using labview with java,i am using datasocket ,but i have not
been able to find anything like datasocket update event in labview

i do not want to use while loop ,with delay fn,i have given lot of
effort but not able to find any solution

2. while loop tunnel has input but not used in loop

3. labview advantages Over other languages

If I want to recommend Labview for real time measuring and analysis.
What one can say?

4. Does Labview take advantage of graphics accelerators?

5. useful,important features and advantages of labVIEW over Dasylab

what are the advantages, applications and attractive features of labVIEW over Dasylab? can we say that labVIEW is superior to dasylab in any aspect?

6. what is advantage of excel over labview measurment file

7. I am using an agilent 82357A GPIB to USB cable but cannot get LABVIEW to connect

8. sir i am using gui application ,i want to change background picture