Go to Post I would like to meet...Andy Baker: I've never met a pig farmer before... - MissInformation [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 11-02-2008, 22:21
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Re: Pneumatics coding

Quote:
Originally Posted by Nguyen View Post
I'm helping out a team with no programming experience and I have basic experience but none relating to FIRST.

They are trying to code their pneumatics but don't know how to do so or even where to start.

The basic setup is as follows:

there are 3 pneumatic valves:
the first one is connected as follows: festo valve -> spike relay -> pwm8
the second is festo valve -> spike relay -> pwm12
the third is festo valve -> spike relay -> pwm16

the compressive is compressor-> spike-> relay8

the 3 valves would be independently controlled by 3 arbitrary joystick buttons

Would anyone be so kind as to point me in the right direction?
ok, so first of all spike relays cannot be plugged into pwm outputs. What they do need to be plugged into are the relay outputs.

ok now that you have all the pneumatics plugged into relays and not pwms, ill go over how they work. The relays are basically 2 digital outputs slapped into a single cable, so there are two bits that you can set. relay#_fwd and relay#_rev. What this gets translated into is either +12V, -12V, 0V to the festo Valves. So in order to set them to one direction you would use this line of code

relay#_fwd = 1;
relay#_rev = 0;

this will set your festo valve to actuate your pneumatic one way and if you switch which bit is set to 1 then you actuate the pneumatic the other way. Now is for some reason you dont want any pressure in the cylinders then you set each bit to 0.

Now if you want to change these based on a button on a joystick then you can change the relay#_fwd and relay#_rev bits inside an if statment such as

if(p1_sw_top ==1)
{
relay#_fwd = 1;
relay#_rev = 0;
}

If you need any help any further feel free to pm me and I'll try to help you.
 


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
C coding ExarKun666 General Forum 12 21-12-2007 14:13
Photoswitch coding magical hands Programming 0 17-01-2006 21:20
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
coding a potentiometer incognito_NICK Programming 5 14-02-2005 15:56


All times are GMT -5. The time now is 23:45.

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