![]() |
Need Help With General Pneumatics
This year is the first year that our team has used pneumatics, so I have never had a need to look into how to program the system. I looked on the other forums, but they only gave disconnected pieces. Any help in this area would be great.
|
Re: Need Help With General Pneumatics
Pneumatics programming is pretty straightforward. The pneumatic solenoids and the compressor are connected through Spikes, which are in turn connected to the Relay pins on the RC. You will turn them on and off just like any other Spike, but you will want to talk to your pneumatics designer to figure out which combinations of on and off will give you the desired behavior. You will need to wire the pressure switch to a digital I/O, and then if that switch is triggered, you have to turn off the Spike that runs the compressor (per <R103>). If you have any more questions, feel free to ask.
|
Re: Need Help With General Pneumatics
Also, to make pneumatics programming easier, I've whipped up a quick set of macros you can use in your project to control the relays.
Changing a relay's state requires you to set a 0 to one variable and a 1 to another, if you forget, they jam, not such a good thing, these macro's will automate the process a bit and neaten up your code. Example of the old way: Code:
relay1_fwd = 1; // This sets relay 1Code:
RELAY1_FWD; // This sets relay 1 to forwardCode:
#include "relays.h"Good luck! |
Re: Need Help With General Pneumatics
Thanks for the adivce. I really appreciate it. One problem we still have is that we've never used pneumatics, and so don't have a pneumatics person. However, I think we'll be able to figure out the wiring. The only remaining problem is the digital sensor thing. I tried to wir up the gear tooth sensor last year, and it coused the camera to freak out, something about it being a costant hardware interrupt or something. How would you make it so the signal doesn't kill the camera?
|
Re: Need Help With General Pneumatics
Quote:
|
Re: Need Help With General Pneumatics
You don't even need an if statement, it can be done in a single line:
COMPRESSOR = 1 - PRESSURE_SENSOR; where COMPRESSOR is the compressor's output, and PRESSURE_SENSOR is the pressure sensor input. |
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? |
Re: Need Help With General Pneumatics
Ryan,
I don't know what an "LD_sensor" is and I don't know what you defined "NOT_TRIPPED" as... Have you looked at the default code from IFI? The compressor control is a single line of code: Code:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */Mike |
| All times are GMT -5. The time now is 15:04. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi