![]() |
Java Arcade with 3 CIM Gearbox
Following this video...
https://youtu.be/WO-FAKuhpNs?list=PL...d2I4m8Z6gfm7YC I have 3 CIM gearbox on each side... comment was made that i may need a y to connect 2 motor into 1 PWM port... i guess thats a limitation on the arcade class??? Since we are using Talon SRX with CAN bus, can i assume that i will just each motor separated in my RobotMap.java like this ? public static final int Drive_Left1 = 0, Drive_Left2 = 1, Drive_Left3 = 2, Drive_Right1 = 3, Drive_Right2 = 4, Drive_Right3 = 5; |
Re: Java Arcade with 3 CIM Gearbox
Our team also uses a 3 CIM gearbox on both sides for our drive train. Look into a slave/master setup. A CANTalon object can be set to follow another CANTalon object.
http://www.ctr-electronics.com/downl...e%20Manual.pdf Section 9.1.3 Also, I don't believe a y connector is legal (I could be mistaken). |
Re: Java Arcade with 3 CIM Gearbox
Quote:
You need one motor controller for each CIM. You need 6 motor controllers of the same type and settings. If you go the PWM route, you will need a total of 4 PWM y connectors. If you go the CAN route, you can simply daisy-chain all of them together, connecting one to the next, eventually connecting all 6 together in a line. For CAN, unlike PWM, you need to set up your master/slave setup. PWM is easier to work with in my opinion. I hope all these snippets help. :) |
Re: Java Arcade with 3 CIM Gearbox
We also have an example that might help....
https://github.com/CrossTheRoadElec/...bot/Robot.java ... basically slave the fifth and sixth talon outside of RobotDrive to the appropriate talons inside RobotDrive. Quote:
A PWM motor controller will provide little feedback as to why it's not doing what you want. |
Re: Java Arcade with 3 CIM Gearbox
Omar,
do i add these lines in my robot.java class? or to my robotmap.java class? I am a little confused and very new to java... I was trying to use Robotbuilder but gave up because the talon SRX are not available... since it feels that it has not been updated since 2013, i am assuming that some new sensors, actuators are missing and feel that i should just code from scratch and learn the hard way... (that's my french sticking....) I am now trying to follow the WPILIB docs and this video Wish i could find a resource that explain what the class are for.... These are my assumption... please correct if i am off.... robot.java --> main program, this is what call all other class/methods robotmap.java --> where i define ports on Roborio, sensors, controller... OI --> define my joystick and human interface... I then create subsystem class in which i call the robotmap.java to get the hardware settings .... |
Re: Java Arcade with 3 CIM Gearbox
Whether or not you use PWM, before you test the code, remove the motors from the gearbox in case one was wired or programmed in reverse polarity.
|
Re: Java Arcade with 3 CIM Gearbox
so here is what i did.... Hopefully this make sense...
in my RobotMap.java.... Code:
public class RobotMap {Code:
private RobotDrive MainDrive = new RobotDrive(RobotMap._frontLeftMotor, RobotMap._rearLeftMotor, RobotMap._frontRightMotor, RobotMap._rearRightMotor);Code:
Joystick _joy = new Joystick(0);Code:
public void teleopPeriodic() { |
Re: Java Arcade with 3 CIM Gearbox
You should just use two motor controllers to create your RobotDrive, one for the left and one for the right, and not four. Then set up the other two left side motors as followers of the one left side motor you used to create RobotDrive. Do the same for the right side.
You do not show your code where you actually set up any motors to be followers. It is well documented in the manual that was linked in a prior post. Edit: I am assuming here that all three motors on one side are on the same gearbox. Hope this helps, Steve |
Re: Java Arcade with 3 CIM Gearbox
do you have an example i could look at?
I though i did... see RobotMap.java up on previous post... i copied directly from Omar github. Any help would be appreciated... |
Re: Java Arcade with 3 CIM Gearbox
yes... using 3 CIM vexpro with Talon SRX...
|
Re: Java Arcade with 3 CIM Gearbox
See section 9.1 here (http://www.ctr-electronics.com/downl...%20Manual.pdf).
It has the Java code to set up one follower/slave for a master Talon SRX. It is essentially this: Code:
slaveMotor1.changeControlMode(CANTalon.ControlMode.Follower);Code:
slaveMotor2.changeControlMode(CANTalon.ControlMode.Follower);I hope this helps, Steve |
Re: Java Arcade with 3 CIM Gearbox
1 Attachment(s)
Quote:
Picture attached. |
Re: Java Arcade with 3 CIM Gearbox
Omar, Not, RobotBuilder does not have Talon...
We coded everything without Robotbuilder as we could not find a great instruction to update RobotBuilder... We are pretty new and really not comfortable with Java / Eclipse / GitHub and everythign else yet...:ahh: :ahh: :ahh: |
Re: Java Arcade with 3 CIM Gearbox
Quote:
Quote:
[2] So I'm guessing your problem is that the code doesn't build? If [1] and [2], then you likely never installed the CTRE Toolsuite which installs the API for CANTalon, and the RobotBuilder additions for CANTalon. Is that possible? |
Re: Java Arcade with 3 CIM Gearbox
finally got it to work with the help of FIRST Help Now this weekend... the code link you provided from Github is working well... but because i am a java newbie, i missed the slave setup from which master to follow....
I though i did download the CTRE suite... obviously i missed a step... will redo tonight. Thanks!!! Seb |
| All times are GMT -5. The time now is 15:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi