View Single Post
  #7   Spotlight this post!  
Unread 24-01-2007, 20:57
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Re: Need Help With General Pneumatics

Hi again, the programming itself is going well. However, today we tried to wire up teh compressr and sensor to test the code to turn the compressor on and off, and as you probaly can guess it didn't work (I hate Murphy). Here's the code and what happened:

In two header files, the following was written:

#define Comp_fwd relay5_fwd
#define Comp_rev relay5_rev

#define P_Sensor rc_dig_in18

#define ON 1
#define OFF 0


in a .c file, with the subroutine being called sucessfully from default routine, and default routine definately being called:


void Pressure_Upkeep(void)
{
if((LD_Sensor == NOT_TRIPPED) && (P_Sensor == NOT_TRIPPED)) {
Comp_fwd = ON; Comp_rev = OFF;
}
else
{
Comp_fwd = OFF;
Comp_rev = OFF;
}
}


The spike was wired as the following:
Ground wire(black) to small metal plate on board
12V wire(red) to 20 amp fuse on the same board
M- wire(black) to black compressor wire
M+ wire(red) to red compressor wire
pwm cable from spike to relay 5, directions checked and correct
pressure sensor wired and connected to digital input 18, direction correct


The results were:
The spike's LED was on and solid orange
the compressor remained off

Variations:
The sensor was unplugged to test for false reading: no change
a different spike was used to test for faulty hardware: no change

It is unlikely that the sensor was tripped, since the pneumatic circuit had just been constructed and had not yet been pressureized, and the sensor does not trip until 115psi

Does anyone know what could be causing this?