LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

question about loops

Hi guys, I'm a newbie in labview programming, or programming in general. I have one question about my code. So I wanted to perform one action in the while loop, I get out of it from the sensor signal and then I want to enter another loop but the program just exits the first one and stops. Here is the code below.  So here is what it's doing. The robot goes straight until IR sensor meets an object. and progam exits the loop. And the the robot should spin 'cus the second loop turns just one motor, but it doesn't.  Sorry for my english, it's not my mother tongue ;d.  And the last question. I know there are lego example programs that I could learn from in Labview, I had found them last week. but I searched it all night and couldnt find it again. Do you guys know where it is?

code.jpg

0 Kudos
Message 1 of 5
(4,891 Views)

Hi

It definitely executes both loops but probably the second loop termination is true immediately.

If you need to repeat the whole proces draw a loop around both loops.

greetings from the Netherlands
0 Kudos
Message 2 of 5
(4,886 Views)

Thanks, You're right, it probably enters the second loop but it's not a problem with a termination case of the second loop. I think i discovered the problem but dont know how to fix. The comparison little triangle block has a red dot in the upper input(but it doesnt show an error), . In the first loop from the sensors "scaled value" comes out and it works. And in the second loop the value from ultrasonic sensors is named "centimeters". I beg for help

0 Kudos
Message 3 of 5
(4,884 Views)

Ok, Problem solved, thanks guys, Can throw away the topic

0 Kudos
Message 4 of 5
(4,874 Views)

Hi, Kamkaj,

 

can You share with us how You solved the problem at the end so if someone gets the same issue he/she can find the solution here?

 

Thanks

0 Kudos
Message 5 of 5
(4,848 Views)