LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running continously without looping

Hi,

 

please ignore. I think i figured it out. Just keep the random generator outside the while loop. 

 

I am trying to write a program and I need this program to run continously without looping. For input there is a random generator which generates an array of random numbers. Rest of the program is showing those values in a knob meter. But there are constraints like only 8 knob meters are available but 12 values in the array. So I am using two buttons next and back. So initially it shows the first 8 values, pressing next shows the next 4 values in the knob meter. Pressing back takes it back to the first 8. If there are more than 12 values, the next and back will work accordingly but currently the code is only for 12 values in the array. But my problem is I used a while loop with stop button to run the program and then random generator keeps changing the values. Is there any way I can do this with just one set of random values, but the program should keep on working. Thanking You.

0 Kudos
Message 1 of 2
(2,156 Views)

@govindsankar wrote:

Hi,

 

please ignore. I think i figured it out. Just keep the random generator outside the while loop. 

 

I am trying to write a program and I need this program to run continously without looping. For input there is a random generator which generates an array of random numbers. Rest of the program is showing those values in a knob meter. But there are constraints like only 8 knob meters are available but 12 values in the array. So I am using two buttons next and back. So initially it shows the first 8 values, pressing next shows the next 4 values in the knob meter. Pressing back takes it back to the first 8. If there are more than 12 values, the next and back will work accordingly but currently the code is only for 12 values in the array. But my problem is I used a while loop with stop button to run the program and then random generator keeps changing the values. Is there any way I can do this with just one set of random values, but the program should keep on working. Thanking You.


Use FIRST CALL function where your program is running. It'll execute when VI is calling for first iterate, from next iterate on wards it'd give FALSE. 

0 Kudos
Message 2 of 2
(2,122 Views)