Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Pneumatics (http://www.chiefdelphi.com/forums/forumdisplay.php?f=54)
-   -   Pneumatics system code (http://www.chiefdelphi.com/forums/showthread.php?t=129776)

Team 4939 24-06-2014 14:24

Re: Pneumatics system code
 
Quote:

Originally Posted by compwiztobe (Post 1391006)
They likely haven't seen them go on because you have never commanded a relay output before. The Relay output lights indicate the current output value.

Another thing to check: Are there any errors appearing on the diagnostics tab of the driver station? You can click Clear Errors to see if any new ones are being reported at the moment. Do this in Teleop Enabled as well. It might be that one of your safety loops is timing out, locking up your outputs. However, you report the other outputs working, so I'm not sure how this could be...

Do you have a multimeter on hand? It might also be worthwhile to unplug the cable from the spike and probe its ends, to see if the digital sidecar is sending an output despite its LED state.


These are the errors that show up on driver station after I click clear :

Code:

WARNING <Code> 44008 occurred at FRC_NetworkCommunications <radioLostEvents>  3178.632 <radioSeenEvents>
FRC:  Robot radio detection times.
Warning <Code> 44002 occurred at Ping Results:  link-GOOD,  DS radio(.4)-bad,  robot radio(.1)-bad,  cRIO(.2)-GOOD,  FMS-bad Driver Station
<time>6/24/2014 2:19:05 PM<unique#>118
FRC:  Driver Station ping status has changed.

I am not sure what these errors mean exactly.

We are getting 3 V on PWM section, 0 V on the relay section, and 0 V on DIO.

Correction:

We are getting 4 V on DIO

Team 4939 24-06-2014 21:30

Re: Pneumatics system code
 
Any help with this issue would be greatly appreciated.

Also my team is pressuring me to re-check the code, because they think that is the case.

Here is the current code that I am running:

Code:

package edu.wpi.first.wpilibj.templates;
 
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Relay;
 
public class RobotTemplate extends SimpleRobot {
   
    RobotDrive chassis = new RobotDrive(1,2);
    Joystick mainStick = new Joystick(1);
    Jaguar jaguar = new Jaguar(3);
    Jaguar jag = new Jaguar(4);
    Compressor compressor = new Compressor(1, 1);
    Relay spike = new Relay(7);
   
    public void robotInit() {
        compressor.start();
    }

    public void autonomous(){
        chassis.setSafetyEnabled(false);
        chassis.drive (-0.5, 0.08);
        Timer.delay(2.0);
        chassis.drive (0, 0.0);
    }
   
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
            double speed = mainStick.getY();
            double rot = -mainStick.getX();
            chassis.arcadeDrive (speed, rot);

            // Solenoid
                spike.set(Relay.Value.kReverse);
        }
    }

If somebody could please check over this code?

Domenic Rodriguez 24-06-2014 22:48

Re: Pneumatics system code
 
This line...
Code:

compressor.start();  // Relay port 1
...and this line...
Code:

spike.set(Relay.Value.kReverse);  // Relay port 7
...should be activating the green LED for Relay 1 and the red LED for Relay 7 on the Digital Sidecar when the robot is enabled in teleop mode. They should turn on regardless of whether Spikes are connected or not. If the LEDs are not activating and you are not measuring any voltage off of these ports, then my conclusion is that there is an issue with either your digital sidecar or the cable connecting it to your cRIO. The code looks fine to me, and it compiles without error in NetBeans.

Aren Siekmeier 25-06-2014 04:45

Re: Pneumatics system code
 
Quote:

Originally Posted by Team 4939 (Post 1391009)
These are the errors that show up on driver station after I click clear :

Code:

WARNING <Code> 44008 occurred at FRC_NetworkCommunications <radioLostEvents>  3178.632 <radioSeenEvents>
FRC:  Robot radio detection times.
Warning <Code> 44002 occurred at Ping Results:  link-GOOD,  DS radio(.4)-bad,  robot radio(.1)-bad,  cRIO(.2)-GOOD,  FMS-bad Driver Station
<time>6/24/2014 2:19:05 PM<unique#>118
FRC:  Driver Station ping status has changed.

I am not sure what these errors mean exactly.

The warning you're seeing is something that usually pops up, simply indicating current status (because, like it says, the ping status has changed and it wants to let you know). So I don't think that's part of it.

Quote:

Originally Posted by Team 4939 (Post 1391009)
We are getting 3 V on PWM section, 0 V on the relay section, and 0 V on DIO.

Correction:

We are getting 4 V on DIO

PWM and DIO both look pretty much fine (assuming you're measuring the voltage I think you're measuring). But let's focus on the relay outputs.

On the relay output, is this measured between one of the signal wires (A or B) and ground (-) while Teleop is enabled? Make sure to measure both A and B relative to ground since which one is active depends on whether you are commanding forward or reverse. If you are not enabled, both will of course be off.

Team 4939 25-06-2014 09:53

Re: Pneumatics system code
 
We tried switching the ribbon cable that connects to the CRIO, and still no reply. The voltage is still dead. We really doubt that the relay section of the sidecar is the only thing disabled, because everything else is working. We measured voltage with teleop enabled as well. We don't know where to go from here.

We don't have a spare sidecar, so any other solutions would be greatly appreciated.

Aren Siekmeier 25-06-2014 11:56

Re: Pneumatics system code
 
Quote:

Originally Posted by Team 4939 (Post 1391086)
We tried switching the ribbon cable that connects to the CRIO, and still no reply. The voltage is still dead. We really doubt that the relay section of the sidecar is the only thing disabled, because everything else is working. We measured voltage with teleop enabled as well. We don't know where to go from here.

We don't have a spare sidecar, so any other solutions would be greatly appreciated.

What voltages are you measuring? Between which pins?

Anthony4939 25-06-2014 17:32

Re: Pneumatics system code
 
A and neg, B and neg on relay and no voltage.

Red and black, white and black, red and white on wire coming from relay, zero voltage.

All other parts of the SC work perfectly.

No Color on LEDs for relay, never seen them on, but never used the relay either.

Aren Siekmeier 26-06-2014 01:33

Re: Pneumatics system code
 
Quote:

Originally Posted by Anthony4939 (Post 1391145)
A and neg, B and neg on relay and no voltage.

Red and black, white and black, red and white on wire coming from relay, zero voltage.

All other parts of the SC work perfectly.

No Color on LEDs for relay, never seen them on, but never used the relay either.

Have you tested all of the relay outputs this way? It sounds like somehow your relay outputs don't work, even though the rest of your sidecar is healthy (you are able to drive, right?). It would be real easy to swap in another to test this point in the system, if only you had another. I saw that you're quite close to several other teams in the Toronto area, perhaps you could contact one of them about borrowing one? And I'm sure someone in your area will be more than happy to spend some time helping with anything else.

Team 4939 27-06-2014 09:25

Re: Pneumatics system code
 
Yes we did test all of our outputs, and it is very odd indeed that only the relay section is not working on the sidecar. By the way we are able to drive the robot.

Unfortunately we are about done for the season, and won't be looking into replacing this sidecar, for the rest of the Summer. When we come back in September a new sidecar will be a priority, and hopefully that fixes the problem.

For now I would like to thank all the people who took out the time to help us try and solve this issue.

Before we end this thread I just wanted to ask, if a pneumatics module would be more reliable in this type of situation?

Thank you once again and have a great summer break everybody.

Aren Siekmeier 27-06-2014 15:59

Re: Pneumatics system code
 
Quote:

Originally Posted by Team 4939 (Post 1391333)
Yes we did test all of our outputs, and it is very odd indeed that only the relay section is not working on the sidecar. By the way we are able to drive the robot.

Unfortunately we are about done for the season, and won't be looking into replacing this sidecar, for the rest of the Summer. When we come back in September a new sidecar will be a priority, and hopefully that fixes the problem.

For now I would like to thank all the people who took out the time to help us try and solve this issue.

Before we end this thread I just wanted to ask, if a pneumatics module would be more reliable in this type of situation?

Thank you once again and have a great summer break everybody.

Perhaps with the new control system coming next year, it might not be worth buying a new sidecar, unless you need a working 2009-2014 system for demo bots. If you can borrow one for testing, that would be ideal. Again, there are several teams in your area and I'm sure a good chunk of them have an extra sidecar.

Both the solenoid breakout and the sidecar are honestly pretty reliable, but the solenoid breakout on the cRio will only power the solenoids. You still need a relay output and a spike to power any onboard compressor. If you're referring to the new PCM for next year, it's hard to say before we get our hands on the details, but I'm sure it will be more than capable as well.

Perhaps you could remove the casing and do some more inspection of the circuit board with your DMM, referencing the schematic. The behavior does seem a bit curious, and I feel like we're missing something...


All times are GMT -5. The time now is 17:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi