Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

data will not leave while loop

i have been working up an application and have hit a snag where data is being manipulated and is destined to exit a 'while loop' but doesnt. i have removed labview and reinstalled it but still no joy.
0 Kudos
Message 1 of 2
(3,139 Views)
Hi,
The data will leave the loop only after the loop is done executing. In the case of your VI, it is when you press the Stop button.
You also have disabled indexing on the output tunnels. What this means is that only the data that is in the tunnel after the last iteration before the loop stops will be passed out of the loop. I assume you are only concerned with the string data. You need to right click on this output tunnel and select to Enable Indexing. This will change this output data into array of strings. You can manipulate this array to get every string from it. However, if you wire this array to the next For Loop, this input tunnel for the For Loop will have Indexing enabled by default. If you don't wire the N terminal to the For Loop, this will then m
ean that the For Loop will run as many times as is the number of elements in the string array input.

I hope this helps you with your application.
Have a nice day.

Zvezdana S.
National Instruments
0 Kudos
Message 2 of 2
(3,139 Views)