ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an array with a while loop

Solved!
Go to solution

I want to create an array using a while loop but I don't know how to do it.  I basically want to do the same thing as in the picture of the example VI found in LabVIEW's example VIs called "XY graph data types.vi," but with a while loops instead of a for loop.  The reason I want to do this with a while loop is because LabVIEW won't allow me to pass error out or VISA out data wires through a for loop.

0 Kudos
Message 1 of 4
(4,586 Views)
Solution
Accepted by CrashMcLars1

LabVIEW certainly does allow you to pass an error out or VISA out through a for loop. The default is to autoindex an output and thus creating an array but it is a simple right click on the exit tunnel to change this. For recent versions, it's changing Tunnel mode to 'Last Value'. You can also use a shift register.

Message 2 of 4
(4,579 Views)

I also want the number of iterations to be finite and user settable. So it must work with any number of iterations.

0 Kudos
Message 3 of 4
(4,575 Views)

Nevermind my last reply. I wrote that before I saw your post. Thanks a lot! That was very easy.

0 Kudos
Message 4 of 4
(4,570 Views)