Ok so rookie team programmer here, as someone who doesn’t particularly know the ins and outs of labview.
The main issue coming up is that, despite having two TalonSRX’s hooked up to SIM motors (One of them is hooked up to PWM 0 and 1, while the other is hooked up to PWM 2 and 3.), only one of the motors is switching from blinking red to orange (PWM 0 and 1) while the other motor stays blinking red.
As this image should show, I do have both Talon’s individually named and wired, but when I enable teleop, one of them just refuses to turn orange (which, with my limited knowledge, is the desired result), as, no matter what I do to the code, it does nothing but sit there and be red.
I have tried switching it so that it was hooked up to one PWM slot (using the Motor control rather than the Open 2 Motors), and that led to neither motor working.
I don’t know much about labview because I’ve never used it, but I do know that orange flashing lights on the talon means it is connected, but the robot is disabled. when you enable the robot do the lights turn solid orange on the one that works? And if you apply a throttle does it turn green/red?
When I enable the teleop on the robot the ones that work turn solid orange, yes. And when the motor starts turning, then the lights turn green, so long as it is spinning.
it sounds like there may be a problem with the hardware. Make sure the talon that’s not working has sound wires and is connected well. And if there’s no problem with the wires, you may need to just swap the talon.
Edit: specifically the PWM cable may be loose somewhere on the not working one.
Switching out the Talon now got both of them to go orange when I turn the code on, but now only the new motor is turning green when I enter the inputs, with the previously working motor doing nothing.
In LabVIEW, if you want to open a single motor at a time, you can open a single motor at a time. Go to Wpi Robotics Library -> Robot Drive -> Motor Control -> Open
The VI’s you are using are meant to open 2 motors (or 4, there are a couple different VI’s). I wish they’d just get rid of them because people get confused and think that’s the ONLY way you can open motors. The way you have it set up in your Begin VI says you want to have 1 motor connected to PWM 0, and one motor connnected to PWM 1, and you will control those both at the same time by setting “Left Motors”. The other open statement is opening another 2 PWM ports for another two motors.
The Open 2 motor VI is meant to make things easier for you by requiring only a single name to refer to two motors - “Left Motors” or “Right Motors”. However, YOU need to verify that they will spin in the same direction first by running them individually if they are in the same mechanism. This is one of the reasons I don’t care for the two motor and four motor VI’s. You always need to turn the motors using the control system first to insure that they are wired identically.
Let’s start over. Can you please post your CURRENT begin VI, and also the VI where you are setting your motor setpoints?
In the Phoenix Tuner, which has to be downloaded to update TalonSRX firmware you plug directly into the Rio, which should soon later give you all the objects on CAN to pop up. Then in the drop down select the motor giving you trouble, and in the tabs on the top hit control. You will have to enable Driver station, but then you enable control in Phoenix Tuner. This will test to see if it is code or Talon giving you this issue. If you could tell me the results once you test this i may be able to help you out some more.
In LabVIEW, if you want to open a single motor at a time, you can open a single motor at a time. Go to Wpi Robotics Library -> Robot Drive -> Motor Control -> Open
The VI’s you are using are meant to open 2 motors (or 4, there are a couple different VI’s). I wish they’d just get rid of them because people get confused and think that’s the ONLY way you can open motors. The way you have it set up in your Begin VI says you want to have 1 motor connected to PWM 0, and one motor connnected to PWM 1, and you will control those both at the same time by setting “Left Motors”. The other open statement is opening another 2 PWM ports for another two motors.
The Open 2 motor VI is meant to make things easier for you by requiring only a single name to refer to two motors - “Left Motors” or “Right Motors”. However, YOU need to verify that they will spin in the same direction first by running them individually if they are in the same mechanism. This is one of the reasons I don’t care for the two motor and four motor VI’s. You always need to turn the motors using the control system first to insure that they are wired identically.
Let’s start over. Can you please post your CURRENT begin VI, and also the VI where you are setting your motor setpoints?
Here’s both my current Begin and Teleop (I have the index set up to be all 0 as I honestly don’t know what that index does, but it previously worked with everything at 0), and, as I’ve already said in post 3, I have tried to use the one motor control in LabVIEW and that didn’t work.
@Crochon2002 As for the Phoenix Tuner, I have absolutely no clue what that is, but motors worked previously without it, so I’m not completely sure if that’s totally necessary?
Those yellow / green wires are NOT PWM. They are CAN bus and must go in with the CAN wiring.
From there you need to install the CTR software and assign each one an ID
Yes that is what i was talking about with Phoenix Tuner. If you need any help with that feel free to ask. Been working my wat a2roubd it, so have gotten pretty familier with it.
You put them in-between. RIO, motor controller, motor controller, PDP. All devices talk to each other over the same lines. You can add many devices, just wire yellow to yellow, and green to green.
Once you get them wired correctly, software installed, and ID’s set this is what your open drive should look like.