Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   programming pneumatics problem (http://www.chiefdelphi.com/forums/showthread.php?t=64489)

program1 18-02-2008 15:55

programming pneumatics problem
 
we tried to load this program and after it finishes, the program does nothing, the spike we set the double compressor turns green but nothing happens,

heres our code we used:

char flag00 = 1;
char flag01 = 1; //set at top of program

if(p2_sw_trig == 1 && flag00 == 1)
{
relay6_fwd = 1;
relay6_rev = 0;
flag01 = 0;
}
else if(p2_sw_trig == 1 && flag00 == -1)
{
relay6_fwd = 0;
relay6_rev = 1;
flag01 = 0;
}
else if (p2_sw_trig == 0 && flag01 == 0)
{
flag01 = 1;
flag00 = flag00 * -1;
}

is there any problems within the program?

Jon Stratis 18-02-2008 16:13

Re: programming pneumatics problem
 
If the spike turns green when it's supposed to be doing something, i'd say the code is working fine... check the wiring.

slavik262 18-02-2008 16:34

Re: programming pneumatics problem
 
Agreed. All the code does is change the state of the spike. After that, the problem lies within the wiring or the pneumatics themselves.

Kevin Sevcik 18-02-2008 17:14

Re: programming pneumatics problem
 
Just checking, but you do realize your relay never turns off, correct? It'll always either be red or green once you hit your trigger.

But yes, check your solenoid wiring. Also, the solenoids are piloted, so it won't want to switch if there's not enough air pressure in the system.

program1 18-02-2008 17:35

Re: programming pneumatics problem
 
Found out the problem. I didn't check the entire code and found that the orginal kevin's code was kinda conflicting the code I wrote for the pneumatics. Hehe my bad.... -_- I WANT COFFEE


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

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