LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Logic

I have for loop in which the main program will be running. As shown in the attached file I have two levels and two delays. These are different instruments am controlling using GPIB and Serial Interface.
Coming to the point, first the level 1 should be set outside the loop and delays might/might not be inside the loop. Here are the steps I have to do.

 

1)      Set Level 1 outside the loop (if possible)

2)      Now, with that Level 1 for certain number (say 50) of main program for loop counts, the delay 1 should be set. After 50 counts, the delay 2 should be switched on.

3)      Now, after 150 counts, Level 1 should be changed to Level 2 (which  had different parameters set), and now the delay 1 should be set. After 50 counts, the delay 2 should be switched on.

4)      This process will go on unless I stop the program.

I tried it in a different way with the for loop but by using the loop inside the loop, there is more delay which is not desirable for our application. I appreciate your support.

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

Sounds like you need a state machine.

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