Our motor controllers don't respond

So our motor controllers are ALWAYS flashing orange no matter what we change in our code. We know it’s not a problem with the electrical because the phoenix tuner is able to get them to run directly, and in the drivers station under the “variables” section the “values” for the motor controllers change as we press joystick buttons. We’ve updated the motor controllers as well and still continue to have this problem.
Here’s what the phoenix tuner says under the self test snapshot for one of the motor controllers:

Victor SPX (Device ID 0) | CAN ID is 0
Device NOT ENABLED!
Motor Type: Brushed
Mode:0:PercentOutput | Output:0.00% [0.00 V]
Motor Leads: M+/M- off
Coast during neutral
VCompEn:F CurrLimited:F

PID0 (primary)
Feedback: No Sensor Selected
Pos: 0u | Vel: 0u/100ms
Slot Select: 0
Err: 0 u | iacc: 0 u-ms | derr: 0 u/ms

PID1 (aux)
Feedback: No Sensor Selected
Pos: 0u | Vel: 0u/100ms
Slot Select: 0
Err: 0 u | iacc: 0 u-ms | derr: 0 u/ms

Limit Switches
Forward:Open
Reverse:Open

Bus: 12.59V

Configurations
Nominal Output: [0.00, 0.00] | Peak Output: [-1.00, 1.00]

FRC Locked:1

“Light Device LED” clears sticky faults.

Build:Jan 24 2020 23:30:08
Press “Refresh” to close.

We understand that our problem may have to do with our motor controller not being enabled. Any ideas on how to fix this?

Thanks

Can you push your code to GitHub and share a link here?

Yeah we tried to do it in the post, but the website wouldn’t let us.
I’ll try again here:

Have you enabled the robot in the driver station?

yup! THe robot is always enabled in the driver station when we’re testing (Otherwise the variables tab in DS would not be updated as we wanted). What’s odd is that the motor controllers are always flashing orange, and that the phoenix tuner is able to directly control the motors based off of their deviced IDs (configured).

Another question pops up actually: when declaring our PWMVictorSPX motor controllers in our subsystems, what exactly does the (int channel) parameter entail? How is that related to the ports on the PDP? Is it even related to the ports on the PDP or is it by each motor controller’s configured Device ID?

Thanks

If you’re able to control them in Phoenix Tuner, then you have them connected via CAN, and you shouldn’t be using the PWMVictorSPX class. Use WPI_VictorSPX instead.

I do not see you ever setting a default command for your drive subsystem. Somewhere during RobotContainer initialization, you should have line of code that looks something like:

   driveTrain.setDefaultCommand(driveCommand);

Also, you have:

   CommandScheduler.getInstance().run();

in both Robot.robotPeriodic() and Robot.teleopPeriodic(). It should only be in robotPeriodic().

Blinking orange means the motor controller is not being driven to any particular value.

So, looking at your github link I don’t know what you are expecting to happen. So here is the first thing I have for you?

Why don’t ANY of your subsystems have default commands? For example, I’ve never seen a robot in command-based that didn’t at least have a teleop-drive command as the DriveTrain default command.

Secondarily, is it ALL of your motor controllers never turn any other color? You are binding commands to buttons, and the scheduler loop is running in robotPeriodic() so I would expect at least the commands to be scheduled.

If you drag the scheduler widget to Shuffleboard when you are running the robot, what does the scheduler show you is running?

Is this a library? we tried to create a WPI_VictorSPX object and the class doesn’t exist.

ah yes we realized that and have changed it since

Yes, it’s a part of CTRE’s library.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.