Go to Post Gracious professionalism... otherwise, the program has failed. - Yan Wang [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2008, 15:55
program1's Avatar
program1 program1 is offline
Registered User
AKA: RJ
FRC #2441
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryknoll
Posts: 43
program1 will become famous soon enough
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?
__________________
ok, who ate my hot pocket?
  #2   Spotlight this post!  
Unread 18-02-2008, 16:13
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,835
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: 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.
  #3   Spotlight this post!  
Unread 18-02-2008, 16:34
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
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.
__________________
  #4   Spotlight this post!  
Unread 18-02-2008, 17:14
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,745
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
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.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #5   Spotlight this post!  
Unread 18-02-2008, 17:35
program1's Avatar
program1 program1 is offline
Registered User
AKA: RJ
FRC #2441
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryknoll
Posts: 43
program1 will become famous soon enough
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
__________________
ok, who ate my hot pocket?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
programming pneumatics holty531 Programming 9 02-02-2008 22:03
Pneumatics Rookie Problem Squishylizard Pneumatics 4 06-02-2007 17:30
pneumatics coding problem (or technical) wildabyss Programming 2 22-02-2005 22:16
pneumatics coding problem (or technical) wildabyss Pneumatics 2 22-02-2005 22:16
Pneumatics Problem + possible fix Srkasner Pneumatics 4 24-02-2004 10:39


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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