LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i control all 3 Nxt motors with a time delay in one labview program

I want to be able to control a probe in 3 dimensions using the NXT, i need to control the degrees of rotation and how often the rotations should occur.

 

For example; moving 30 degrees with motor A every 5 seconds, (approx 100 times) and 90 degrees with motor B every 5 seconds (approx 100 times). But before motor C rotates by 30 Degrees, I need motor A to return to its original Position, (100*-30 = 3000 degrees), hence total time lag of (100*5 = 500 seconds).

Time taken for motor A to return to original position also needs to be taken into account, and during this time motor B should be on 'pause'.

0 Kudos
Message 1 of 2
(5,820 Views)

Hi Mojo_jojo,

you can use a while loop with a case structure inside it, to build a state machine. Make your different moves in different cases to get what you want.

 

Hope it helps.

Mike

Message 2 of 2
(5,791 Views)