LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make while loop that continuously runs and re-indexes to zero

Solved!
Go to solution

Hi,

 

I am attempting to send and read some data across the serial port. I am sending separate strings that are stored in an array and the serial port reads a value that is returned from my instrument for each string that is sent to it. The array is indexed by the "i" in the while loop. My problem is, the while loop will run until it reaches the maximum array index + 1, then stop. I would like to have the index restart to zero once it reaches the maximum "i"-value so it will resend the values from my array again; it is essentially a monitor program for an instrument and I need to continually update the monitor variables. I am new to Labview but it is definitely cool! If someone would be so kind to help, I would really appreciate it.

 

Thanks,

 

Mike

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

How about using another loop  Smiley Wink

 

Nested loop.........

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 2 of 4
(2,894 Views)
Solution
Accepted by topic author famouspotatoes1

Anil Reddy wrote:

How about using another loop  Smiley Wink

 

Nested loop.........


Please don't do this.

 

A Quotient and Remainder function is all that you need. The y input is equal to the array size.

 

Message Edited by Dennis Knutson on 03-09-2009 08:56 PM
Message 3 of 4
(2,889 Views)

Dennis Knutson wrote:

Anil Reddy wrote:

How about using another loop  Smiley Wink

 

Nested loop.........


Please don't do this.

 

A Quotient and Remainder function is all that you need. The y input is equal to the array size.

 

Message Edited by Dennis Knutson on 03-09-2009 08:56 PM

Thanks a bunch, that worked!

 

Mike

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