View Single Post
  #6   Spotlight this post!  
Unread 15-02-2013, 09:52
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,753
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Compressor Issue

A simple test to help you isolate the problem:

Take a screwdriver or a short piece of wire and short the pressure switch (connect the two terminals). This will completely take the switch out of the picture. You'll see one of two results:
1. The compressor runs constant until you remove the short (keep an eye on the pressure gauge, don't let it get too high!).
2. You continue seeing the same behavior you saw before.

In the case of situation 1, you now know that the code is fine, and the problem is the pressure switch. This is because you gave the Digital Sidecar a constant signal from the switch indicating that you were below pressure.

In the case of situation 2, you know the issue is in your code. Look for a possible path where the relay is being turned off and then back to forward. For example, something like this:

Code:
relay.set(Relay.Value.kOff);
if (pressureSwitch)
{
    relay.set(Relay.Value.kForward);
}
Also, please note that the commands don't have to be this close together... look at ALL commands sent to the relay and make sure you don't end up with a situation like this.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA