|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Inverting Talon SRX
So a few days ago we were putting together the code for an elevator and realized that the limit switches were backwards, basically the top limit switch stops it if it is going down and bottom stops it if it is going up. We are using the Talon SRX with the CAN bus and I was just wondering if there would be a way to invert it in the code? I know we can do it physically, and will probably end up doing that, but code would be much easier. I looked in the manual and couldn't find anything, so maybe it is hidden? I know with a Talon SR we can do random_motor->SetInvertedMotor(can't remember if it's bool); but it doesn't work with an SRX. Any ideas?
|
|
#2
|
||||
|
||||
|
Re: Inverting Talon SRX
The procedure is documented in talon programming manual. But the "forward" limit switch stops the controller in the "forward direction" That might be down. Also if you are using normally closed limited switches you need to set that in the talon web dashboard. The default is N.O.
|
|
#3
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
Thanks for the help! |
|
#4
|
||||
|
||||
|
Re: Inverting Talon SRX
You will need to fix it in the wiring. If the Talon is green (positive throttle) it will only check the forward limit switch. What causes the Talon to be green (closed-loop, slaving, slave-invert) instead of red (Reverse) can be controlled by Reverse Sensor and Reverse Closed-Loop output. But the limit switch is compared against the final output.
|
|
#5
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: Inverting Talon SRX
The SetInvertedMotor() method is generic to any motor speed controller. What makes you think it doesn't work with a Talon SRX?
|
|
#7
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
right_motor->SetInvertedMotor(); It says it can't resolve SetInveretedMotor(), and also the header files for both CANTalon and CANSpeedController do not have this method. Last edited by King Nerd III : 25-02-2015 at 16:13. |
|
#8
|
|||||
|
|||||
|
Re: Inverting Talon SRX
Quote:
I should stop being subtle. It isn't working. |
|
#9
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
|
|
#10
|
||||
|
||||
|
Re: Inverting Talon SRX
And like Omar said this is all internal to the Talon - when it is green it is looking for the "forward" limit no matter the software convention.
|
|
#11
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
We'll do it, though. For the team! |
|
#12
|
||||
|
||||
|
Re: Inverting Talon SRX
Use connectors for all sensors and motors so they can be removed/replaced easily. It makes repairs (especially under stress) much easier.
|
|
#13
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
[board]~~wire~~[pwm connector][pwm connector]~~wire~~[sensor] It works well enough! |
|
#14
|
||||
|
||||
|
Re: Inverting Talon SRX
So just reconnecting the PWM-PWM interfaces for the 2 sensors should fix things?
|
|
#15
|
||||
|
||||
|
Re: Inverting Talon SRX
Quote:
We had a snow day today so no robotics, but on Saturday I should be able to rewire the entire thing. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|