From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop while loop after getting result once

I have given a  query in serail port write and read by the serail port read VI in a sequence loop.But never it yield result.  Thus I put a delay in read frame  with 1,10,100, 1000 etc millisec. But it never gave a result. Thus I put sequence loop inside a while loop  with timer outside sequence loop and inside while loop and I put "i " terminal 1 but never worked its going on running.So can you please help me with a way to stop while loop.

0 Kudos
Message 1 of 4
(2,923 Views)

I don't see how this is an Instrument Control question. It should have been posted to the LabVIEW board.

 

There is no such thing as a sequence loop. There is a sequence structure and a timed sequence. A while loop will terminate when the conditional terminal gets a specific Boolean value. There is nothing that you can wire to it's 'i' terminal. That is an indicator so what you are describing is senseless. At the very least, you should have attached an image of your block diagram.

0 Kudos
Message 2 of 4
(2,917 Views)

I had used the sequence structure .  The conditional terminal is given "continue if true" option, as i changed it to stop if true it is not at all giving any result. "i " is for iterations I think. So please help

0 Kudos
Message 3 of 4
(2,901 Views)
A while loop will always stop if the value of the conditional terminal is met. Can't help any more if you don't attach your code.
0 Kudos
Message 4 of 4
(2,898 Views)