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: 

while loop

I have a Input string "1.15;10;1.25;20;1.35;30;1.45;40".  i need to seperate the data, use a For loop i need to input the Iterations

the String length will change.

I want to use a While loop and have it stop when there is no more data.  i can only get it to work when i use a stop button.

thanks

0 Kudos
Message 1 of 6
(4,430 Views)

Hi JWT,

 

you only need a FOR loop:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(4,426 Views)

Why use a loop at all?

 

Use Split Strings.vi

Capture.PNG

Its in vi.lib\Advanced String\

 

There is even a Free Toolkit called "Hidden Gems" that sticks some of those useful vis on the functions pallets.

 

 

@Gerd:  What's the loop for?Smiley Surprised


"Should be" isn't "Is" -Jay
Message 3 of 6
(4,422 Views)

Hi Jeff,

 

I made that snippet before even looking at JWTs VI.

In the message the words "FOR loop" and "WHILE loop" came up, so I included AUTOINDEXING in the snippet…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(4,417 Views)

Thank you

JWTIII

0 Kudos
Message 5 of 6
(4,407 Views)

Thanks are given with kudos, and marking the appropriate answer (or more appropriate) in the thread.

0 Kudos
Message 6 of 6
(4,383 Views)