Hi, I’m trying to configure a hardware limit switch using the configForwardLimitSwitchSource(); and configReverseLimitSwitchSource(); on a TalonSRX motor controller. What parameters should I put into these methods since the ones I got from Phoenix Tuner didn’t work?
Hello, if you are trying to run a command depending on the limit switch’s status, you can also connect the limit switch to the roboRIO and read the value from limit switch as an input then you can run the command with a simple if-else statement.
I believe those methods tell the TalonSRX where the Limit switches are connected and needed if you plan NOT to wire them to the Data Port of the TalonSRX but to a remote TalonSRX or CANifier. https://github.com/CrossTheRoadElec/Phoenix-api/blob/master/src/main/java/com/ctre/phoenix/motorcontrol/LimitSwitchSource.java
What are your intentions?
Do you wish to switch them from normally open to normally closed?
Use a switch to zero an encoder?
Monitor the switch in your Code?
This doesn’t yet answer your question but points out that the method you asked about has many Overloads and parameter input patterns and possibilities here are the Java Docs:
The Phoenix Documentation on Github includes examples for remote and non remote limit switches.