PCM can activate but Phoenix can't find it

Hey
Yesterday, our team decides to wire the pneumatics system. After we updated the new image of roboRIO (4.0) and connected the PCM, the Phoenix Turner started to show on log, node errors in PDP and PCM.

Self Test (Phoenix Turner)


image

Web Diagnostic Log (Phoenix Diag Client)
image
image

However, when I deploy code, CAN, PCM and PDP works without problems.
So my question is: Why the Phoenix Services (Turner and DiagClient) is showing errors? The code doesn’t affect and the Driver Station Console Log doesn’t print any problem.

I think it could be one of these two problems (I don’t know if I’m right):

  1. Components, because PCM blinks the green light of STATUS and the red lights of solenoid, but the COMP doesn’t blink any color. I can still turn on the compressor by the code and joystick, even not turning on the COMP led.

  2. Temporary Diagnostic Server, because every restart of roboRIO or code deploy, I needed to run a Temporary Diagnostic Server on Phoenix Turner. I tried to install the Phoenix Libary/Diagnostics on Phoenix DiagClient, but it doesn’t find roboRIO at USB or Wireless. The DiagClient only finds when I turned the Temporary Diagnostic Server on Turner, and finds changing very fast between “Connecting to 172.22…” and “Updating 172.22…”. This doesn’t make much sense to me, since the turner only has the option to run temporarily, and DiagClient should install the Phoenix on roboRIO without needing the Turner.

Our team uses RobotPy.

To me it looks like everything is working.
You can ignore those messages in the log window, though it looks like you’re running an old version of Tuner. I’d recommend downloading our installer at Software and running it to get the latest version.
The log is indicating an error when it attempts to get configs for the PCM and PDP, which have no configs, so it’s not a big deal. As long as you can change ID, blink, set name, firmware update, and self-test snapshot, you’ve got full functionality over the PDP and PCM through Tuner, and it won’t affect your robot code at all.
Final note, you probably have to deploy the temporary diagnostic server because you’re not using the Phoenix library. Phoenix has the diagnostic server embedded in it, so as long as you construct a CTRE CAN device that is not a PCM or PDP, the diagnostic server will start. If you’re just using a PDP and PCM and want the diagnostic server, I’d recommend calling setPhoenixDiagnosticsStartTime with a non-negative value. It looks like the python API for it is here: Unmanaged — RobotPy CTRE 2022.1.0 documentation

1 Like

Can this not cause future problems?

I’m running 1.8.0.0 version. I already reinstalled 3 times the Phoenix Framework.

So… I put a VictorSPX here but I still need to turn on the temporary diagnostic server every time the robot is restarted.

Phoenix Turner still display this warning, even if there’s still a VictorSPX in the path of CAN.

Cool! I didn’t know this function. It might be useful later on.

Nope, if anything it’s to cover future problems in case configs ever get added to PCM and PDP. Tuner doesn’t know what devices do and don’t have configs, so it tries to get configs for all devices and manages the config page based on it.

Cool, that’s that latest version, I made an assumption based on the log and was incorrect, so you can ignore my comment.

I’m not entirely sure how Python handles construction of devices. Declaring a VictorSPX might be sufficient to call the constructor, or it might require usage if it’s lazy-constructed.

Sorry, I just got the chance to test this, it looks like you also need to call loadPhoenix to properly load phoenix, then setPhoenixDiagnosticsStartTime can configure the time to start the server. So, I would try calling loadPhoenix to get the diagnostic server up and running in your project, or use that VictorSPX in your code. You should see console messages such as [phoenix] Library initialization is complete. and [phoenix-diagnostics] Server 1.9.1 (Feb 3 2022,23:24:09) running on port: 1250 in your output if Phoenix properly starts in your project.

1 Like

oh yeah
I coded a VictorSPX here and it worked! I believe that we won’t even need this function now, since the robot will have VictorSPX. However, thanks for the help, @TytanRock! I’ll use these functions in a future project :slight_smile: