K519_1325
15-02-2014, 11:40
We are having problems with our relays. We used to having our relays working, but they have all suddenly stopped working, on both different robots.
The spike is getting power, as there is the LED indicator is orange. The brand new VEX Pro spike is connected to our compressor, with the PWM Cable running to Relay 3 on the digital sidecar. We have the ribbon cable running form the digital sidecar to the module in slot 2 on the cRio, with the terminal screws in. The code on for the spike is as follows. The code below is only for the spike and the joystick.
class RobotDemo : public IterativeRobot
{
Relay *manualCompressor;
Joystick *primaryController;
public:
RobotDemo(){
manualCompressor = new Relay(3);
primaryController = new Joystick(1);
}
void RobotDemo::TeleOpPeriodic(){
if(primaryController->GetRawButton(6)){
manualCompressor->Set(Relay::kForward);
}
else if(primaryController->GetRawButton(5)){
manualCompressor->Set(Relay::kReverse);
}
else{
manualCompressor->Set(Relay::kOff);
}
}
Every subsystem that runs off of a victor on our robot (i.e. our drivetrain) work just fine. I even put an indication on the Smart Dashboard that told me when the button assigned to the spike was pressed. I put that code inside the if statement for the spike, so I know that the if statement is executing.
We have no idea what is wrong with our relays, and would really appreciate some help and ideas.
Thanks,
The spike is getting power, as there is the LED indicator is orange. The brand new VEX Pro spike is connected to our compressor, with the PWM Cable running to Relay 3 on the digital sidecar. We have the ribbon cable running form the digital sidecar to the module in slot 2 on the cRio, with the terminal screws in. The code on for the spike is as follows. The code below is only for the spike and the joystick.
class RobotDemo : public IterativeRobot
{
Relay *manualCompressor;
Joystick *primaryController;
public:
RobotDemo(){
manualCompressor = new Relay(3);
primaryController = new Joystick(1);
}
void RobotDemo::TeleOpPeriodic(){
if(primaryController->GetRawButton(6)){
manualCompressor->Set(Relay::kForward);
}
else if(primaryController->GetRawButton(5)){
manualCompressor->Set(Relay::kReverse);
}
else{
manualCompressor->Set(Relay::kOff);
}
}
Every subsystem that runs off of a victor on our robot (i.e. our drivetrain) work just fine. I even put an indication on the Smart Dashboard that told me when the button assigned to the spike was pressed. I put that code inside the if statement for the spike, so I know that the if statement is executing.
We have no idea what is wrong with our relays, and would really appreciate some help and ideas.
Thanks,