FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

4 motor drive with joystick

Solved!
Go to solution

I have a robot that has 4 motors, on for each wheel. That means 2 motors on the right side and 2 motors on the left side. With the remote control editor, on the Configure Robot Drive, it only allows you to set one motor per side that I can find. How do I get around this? With this new "helpful" (i.e. limiting) IDE I haven't figured it out yet.

Thanks

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 1 of 6
(5,281 Views)

Hey LoclheedJoe,

To control your drive train with four motors your best bet will be to use the Remote Control Editor to generate code for a drive style of "None". You will then need to create code that interprets the joystick x,y positions into values for each individual motor.  The Remote Control Editor just gives a visual method for creating basic drive code but anything more advanced will need custom user written code.  Please post back if you have any additional questions.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 6
(3,542 Views)

Thanks for the Reply. I tried that but could not find the Joystick.vi. I tried to search (<ctrl><space>) but the only "Joystick" vi was the "calculate power from Joystick.vi"  I also just tried looking and there is a limited number of paletes. Any thoughts on how to get to the Joystick.vi?

Thanks

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 3 of 6
(3,542 Views)
Solution
Accepted by LockheedJoe

Hey LockheedJoe,

You will need to use the ouput of the FTC Read Controller Packet VI (which is a cluster of the x and y positions of the joysticks on the controller) to create a custom VI to calculate the motor power for each motor.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 6
(3,542 Views)

You really dont need to calculate 4 different motor powers. Dont you want the two motors on the left to just run at the same speed?

If so you can just generate tank code for two motors. Then in the generated code expand the each address constant to reference both motors on the controller instead of just one.  You will need to have the left motors on the one controller, and the right motors on the other controller.

0 Kudos
Message 5 of 6
(3,542 Views)

I understand to have both motors on a side to work together.

Actually, I figured out what I needed for the Joystick late last night. I needed to go to the Properties and "turn off" the FTC front end that is invoked at startup time of the LabVIEW for mindstorms package and use the standard LabVIEW interface that starts with standard LabVIEW.

The LabVIEW for Mindstorms custom front end "helps" you by limiting your vi's and how you set things up. It took away the "FTC Read Controller Packet.vi". Once I changed to the standard interface, all the vi's are there.

Thanks

"Lockheed" Joe
Testing Blog"
0 Kudos
Message 6 of 6
(3,542 Views)