LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

motion control with joystich

hi every one I'm tring to contol the nxt using joystich i'm doing a simple program but i have aproblem
with the first vi the nxt response for x- axis values with out y- axis values the problem is that it the 2 cases are not working in parallel!!
 
how ca i use only one case structer
 
i have tried the vi avilable in ni about the joystick motion control but i coldn't find a solution !!
 
the second is working but the nxt movement is not same as the joy stick position
 
(my lab view version is 8.2)
please any help!!
Download All
0 Kudos
Message 1 of 6
(7,437 Views)
Any help pleas !!
0 Kudos
Message 2 of 6
(7,425 Views)
any idea please Smiley Sad
0 Kudos
Message 3 of 6
(7,400 Views)
Hi Mar-Q,
change your first example a little bit. Remove the variables, you don´t need them. Calculate first the x and y value and connect then this values directly to your motor vi´s. If you do it, you have the correct flow and it should work.

Mike
0 Kudos
Message 4 of 6
(7,397 Views)

Hi mike

 

thank you, but hou can i control the power and direction by calculations?

 

thanks

0 Kudos
Message 5 of 6
(7,376 Views)

Hi Mar-Q,

i think the direction results from the direction you press the joystick key, and the power depend on how strong you press the key (if it is possible), if not you can measure the time how long the key is already pressed and depending on that you calcualte the power.

Mike

0 Kudos
Message 6 of 6
(7,366 Views)