Go to Post I believe in my students, I encourage them to fail in their endeavors to find the best formula. There is valuation in failure. - Chief Hedgehog [more]
Home
Go Back   Chief Delphi > Technical > Pneumatics
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 01-05-2008, 17:46
DPTeam270Driver's Avatar
DPTeam270Driver DPTeam270Driver is offline
Deer Park Driver
FRC #0270 (Falcon X)
Team Role: Driver
 
Join Date: Jan 2008
Rookie Year: 1998
Location: Deer Park
Posts: 34
DPTeam270Driver will become famous soon enoughDPTeam270Driver will become famous soon enough
I need some help with programming the Pneumatics

Heyy guys
our team has a demo robot that we would like to have pneumatics on.
but we dont know how to program pneumatics in easy-c
if some one could help us and show a sample code to use that would be great
we have 3 pistons hooked up to solenoids and spikes. they are all wired up to the board, but we just need a program to put in. we would like them to fire on buttons
thank you to anyone who can help us
  #2   Spotlight this post!  
Unread 01-05-2008, 18:58
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: I need some help with programming the Pneumatics

I'll let someone else help with the EasyC syntax, but I'll at least give you some insight that might allow you to help yourself.

Think about what you want to do in plain English.

Code:
If the port 1 trigger button is pressed, set relay 1 to on...otherwise (else) set relay 1 to off

If the port 1 top button is pressed, set relay 2 to on...otherwise (else) set relay 2 to off

If the port 1 aux1 button is pressed, set relay 3 to on...otherwise (else) set relay 3 to off
There are two values that you can set in order to set the state of a relay, forward and reverse. This table should help you determine what you need to do to get the desired result
Code:
Fwd = 0 Rev = 0 - OFF (orange)
Fwd = 0 Rev = 1 - Reverse (red)
Fwd = 1 Rev = 0 - Forward (green)
Fwd = 1 Rev = 1 - OFF (orange)
So what blocks in EasyC correspond with the description above? Well, there's probably an If/Else block and there's probably a relay out block. Think through it, and experiment a bit. I'm sure that if you try it you'll figure it out. I would suggest not connecting the outputs of the relays and using the LED on the spike as feedback on whether your code is working or not. This will protect you from accidental misfires.
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
NEED HELP WITH uncontrollable pneumatics Tds123 Pneumatics 6 11-02-2008 04:34
NEED HELP WITH WHOLE PNEUMATICS Reaper40 Pneumatics 2 17-02-2007 21:23
Need Help With General Pneumatics Ryan O Programming 7 24-01-2007 21:31
Hi, I need some help with the MPLAB IDE... razer Programming 9 04-01-2007 07:47
need some help with the OI, and wiring a display pryoplasm Control System 8 10-03-2004 20:46


All times are GMT -5. The time now is 12:03.

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