Digital Sidecar Control Not Working

My team and I have been trying to get our old robot running and the Digital Sidecar isn’t responding to I/O commands. I can control a relay (spike) just fine, but we can’t control the victor at all. It’s just flashing orange. We know the PWM cable is good and the code is just very simple and should work. Also every node from the Digital I/O section of the Digital sidecar is giving out a constant 5v. Any help appreciated, I’ll also post my code here in-case that may be the problem.

/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Victor;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends IterativeRobot {
    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    //ADXL345_I2C accel;
    Relay spike;
    Joystick joy;
    Victor vict;
    public void robotInit() {
        //accel = new ADXL345_I2C(1,ADXL345_I2C.DataFormat_Range.k2G);
        spike = new Relay(1);
        vict = new Victor(1);
        joy = new Joystick(1);
    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
        //System.out.println("Acceleration X: " + accel.getAcceleration(ADXL345_I2C.Axes.kX));
        System.out.println("Joystick Y:" + joy.getY());
        vict.set(joy.getY());
        
        if(joy.getAxis(Joystick.AxisType.kY)<0)
        {
            spike.set(Relay.Value.kForward);
            System.out.println("Spike reverse");
        }
        else if(joy.getAxis(Joystick.AxisType.kY)>0)
        {
            spike.set(Relay.Value.kReverse);
            System.out.println("Spike reverse");
        }
    }
    
}

Assuming your code is not throwing an exception as you are able to control the Spike, would you check if the pwm’s are plugged in correctly, as that was the first mistake when we were programming our DT.

I’m pretty sure the code is fine though.

Good luck!

Did you move the cRIO modules around to their new positions?

It is very hard to get a PWM cable installed in a Victor far enough the first time. I wouldn’t be surprised if that was the problem.

Another possibility is if you had to fix your DB37 cable, it may not have been fully crimped, and only some of the pins made contact. I saw one robot where PWM 1 worked but PWM 2 did not because of that problem.

Dont you need a while loop in teleop? otherwise it just runs once no?

Not in the Iterative template. The “periodic” functions in the Iterative Template are called once per DS packet, ~ every 20ms (which one gets called obviously depends on the current mode)

Yes we do have the Modules in the correct new positions (minus the last solenoid breakout, we only have one of those). The DB37 cable should be fine, as we’ve used this robot before (it’s ~6 years old.) however I will check the continuity of all pins once we meet again. I’ll also be sure to triple-check PWM orientation and make sure it is in far enough, although I’m 99% sure orientation is correct.(Signal cable on outside of Victor?)

Yes, White on the outside.

Ah ok, im used to using:


public void operatorControl {
while(isOperatorControl) {


   }
}



We’re having the same issue, except we’re controlling Jaguars instead of Victors. It’s definitely a problem with either the software or the digital sidecar because we’ve probed the signal wire on the PWM cable and it is always 0 V.

Our digital module is plugged in Port 2 on the cRIO, which we believe is correct and it shows up as green in the provisioning tool. Were you able to diagnose your problem?

We solved this problem on our robot today. One of the connectors on the ribbon cable between the cRIO module and digital sidecar was not crimped tightly enough. This may be your problem as well if you received a faulty ribbon cable and had to correct re-crimp the connector yourself. Even if it superficially looks correct, it may not be crimped tightly enough to make the connections.

Check the LED next to the RSL connector on the digital sidecar. If it is not illuminated, then this is likely your problem.