View Full Version : how to add drive motors?
Ian McShane
08-02-2011, 19:23
need to add 2 drive motors to all vi's. how do i do this, how do i hook up the jaguars in the block diagram, how do i tell it which jaguar to look for in the arcade drive block. diagrams would be helpfull:)
Mark McLeod
08-02-2011, 20:19
Do you mean that you have 2 motor drive and you want to make it a 4 motor drive (2 motors per side)?
Ian McShane
09-02-2011, 18:10
yep
Mark McLeod
09-02-2011, 18:45
That's pretty simple.
You only need to modify the use of one icon in Begin.vi.
Open Begin.vi, then the block diagram
Locate the Open 2 Motor icon.
Right-click on Open 2 Motor and go to Replace -> All Palettes -> WPI Robotics Library -> RobotDrive and choose Open 4 Motor
Delete the two PWM settings left over to cleanup the labels.
Add constants for all four input nodes and set them to your other two motors.
Right-click on each of the PWM inputs, go to Visible Items -> Label and let go. The name of the input will appear and you might want to drag it to the left side of the PWM constant.
Set the PWMs to match where your 4 motors are.
Create constants for the two Inverted nodes on the bottom of the Open 4 Motor icon.
Set both the motors on one side of the robot be Inverted. If you guess wrong and the robot drives backwards instead of forwards, just go back into the code and reverse which side gets Inverted.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.