Issues getting a falcon500 to function

This year my team is going to use falcon500s for our drivetrain, and I’m working on testing the code for them. I’m a programmer and I don’t know much about electrical, so I might not refer to things properly. I’ve been testing code on a test bot that just has one falcon500 and nothing else. I don’t know if it’s wired correctly, but it seems like the can wires go from the rio to a victor to the falcon then end at a pneumatic control unit, and the red and black wires are connected to the PDP. I don’t know if the falcon needs to be set up in some specific way to get an id or anything, but I do have the phoenix tuner software if I need it. The only code I have for falcon500s at the moment is set up for a drivetrain with 4 falcons, and I don’t know if that means it wouldn’t work with only one hooked up. I’m able to connect to the robot, deploy code, and enable the robot, so I know that isn’t the issue.

I can take pictures of the robot if anyone needs it, and the code I’m using is below.
https://github.com/IcedJavaRobotics/2022-Rapid-React

I believe your CAN wires need to terminate at the PDP. If not, you need a terminating resistor https://www.andymark.com/products/can-terminating-resistor#:~:text=Product%20Overview-,The%20CAN%20terminating%20resistor%20is%20used%20to%20terminate%20the%20can,FRC%20components%20use%20to%20communicate.&text=These%20two%20wires%20must%20be,Distribution%20Panel%20to%20do%20so.
You can buy the resistor from any retailer.

At the very least you need to know the Falcon’s CAN ID to address commands to it.
Use Phoenix Tuner to find and check the Falcon.
That’ll also tell you the CAN bus is working or not.
Don’t use a CAN ID of zero, that’s the factory default for all Falcons and they all should have unique CAN IDs.

1 Like

It turns out that some of the can wires we were using were meant specifically for spark maxes, which we aren’t using. That meant the wires weren’t all connected. Also, yes the can wires weren’t terminated.

One other tip, you will need the Phoenix tuner software - make sure everything is up to date - libraries, firmware etc. Cross the road electronics has all the documentation for the Talon FX on their website, take the time to read through it.

1 Like

The can wires are fixed now and I was able to set the falcon500 to an ID of 4, but for some reason it still won’t spin at all. When the robot is enabled there will be a few errors that show up for a split second but I can never make out when it says, and they don’t show up on the driverstation console log. If I manage to find the errors I’ll share them. I think it’s probably something to do with code at this point.

If the messages are showing up in the Driver Station window, then you can scroll up to see them.
I usually click and hold while scrolling up with the mouse to highlight all the text, then copy and paste into a text editor to read it all more easily.

The error message is
CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.
CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.
CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.
and it’s because the 3 other falcons for the drivetrain aren’t plugged in. I’m not sure if this would cause it to not work at all for the one that is plugged in. I’m trying to get 3 more plugged in, but if I don’t have to I’d rather not.

It should work with just the one connected.
Check to see how your code uses the motor ID 4 and make sure it’s being directly commanded to move.
For instance, if it gets defined as a follower of one of the missing motors, then nothing will happen.

I’ve written new code just to test out a falcon. It still isn’t working, and the only error is that the other falcons aren’t there. The button is set to 2 on the flight stick and the velocity is at 1. I’m not sure what unit the velocity is in for falcons, so it could be that it’s just moving too slow to tell.

https://github.com/IcedJavaRobotics/2022-Rapid-React/tree/talon-test

I couldn’t pull up your code from your GitHub link , but try running the motor in percent output first. That way you won’t have any unit concerns.

You can also try to run the motor directly from the phoenix tuner in the control tab.

I apologize, I had forgotten to change it to public, should be good now but I’ll put the link here just in case. I’ll try to do percent output on it now.

It looks like you are defining talon 4 twice - once in drivetrainsubsystem and once in talontest. Also, you are setting the output to 5 in percent output mode - the value should be between 0 and 1z

Finally - looks like you are mixing percent output and velocity mode in your talontest subsystem.

I fixed the mixing of control mode in talontest subsystem, and I fixed the double-defined talon 4. I was actually able to get the talon spinning with the percentoutput set to 5.

Thats because the value is clamped to [-1,1]. So 1, 5, pi, e, 100, and 42 will all have the same resulting motor speed.

I am no longer able to get test talon to spin, and I’ve updated the github to have my latest code. I’m connected the exact same way as before and the button is the same. All that I’ve changed is the control mode to all percent output in test talon subsystem, and changed the name of what displays on smart dashboard. The errors that show up in the console are similar to before.

ERROR  103  CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.  Talon FX 4 
ERROR  103  CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.  Talon FX 2 
ERROR  103  CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.  Talon FX 3 
ERROR  103  CTR: Firm Vers could not be retrieved. Use Phoenix Tuner to check ID and firmware(CRF) version.  Talon FX 1 
ERROR  -3  CTR: CAN frame not received/too-stale.  Talon FX 4 GetSelectedSensorVelocity 
ERROR  -3  CTR: CAN frame not received/too-stale.  Talon FX 4 GetSelectedSensorVelocity 

When I enable the robot, the lights on the falcon are solid orange, and I can’t figure out what that means even while looking at the user manual.

Something to note about your CAN setup is that it would not pass inspection: your roboRIO and PDP are required to be wired into CAN bus. Additionally the network should terminate at the RIO and the PDP, if it doesn’t you’ll need a resistor.

From what I can tell, one of our electrical members just made it to where it starts at the rio and ends and the pdp.

It means they are being set to 0, presumably in your robot code somewhere.