LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking Out of While Loop and Entering The Next Programme ( Flat Structure )

Hi guys, i'm quite new to LB. I'm currently programming MyRio project. I'm facing a problem is that i want my program to loop until my sensor detect specific distance and stop the loop, then it will go to the next program. 

image.pngimage.png

When the programme runs, the robot would start to move forward first.

After the robot detects the distance, it would start to turn and it would just turn and it would not go to the next program even after the value is true, and it also appears that my programme in my computer has stop while the robot is still moving.

 

Is there any solution to this problem? Thank you .

0 Kudos
Message 1 of 3
(2,142 Views)

You need to look at the state machine architecture. It would allow you to do the things that you need to do. There is an example in the find example in the menu bar. Take a look there and try to implement something.

Tim
GHSP
0 Kudos
Message 2 of 3
(2,137 Views)

alright, i'll look into it, thks.

0 Kudos
Message 3 of 3
(2,131 Views)