Go to Post Lawrence North has air conditioning. If it didn't, more than just balls would be sticky. - Andy Baker [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 31-01-2008, 22:03
holty531 holty531 is offline
Registered User
FRC #2441
Team Role: Electrical
 
Join Date: Jan 2008
Rookie Year: 2008
Location: hawaii
Posts: 15
holty531 is an unknown quantity at this point
programming pneumatics

hi, we are using mplab default code, so basically we can drive two cim motors so far with speed controllers.
we are trying to have the compresser turn on.
what shoul we write or do with the relays to have the compresser always on?
which relay output # ?

can someone copy paste their code about the compresser turning on?

as for the nason pressure switch, after we connect it to a digital port, then what?...

thanks.
  #2   Spotlight this post!  
Unread 31-01-2008, 22:21
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,998
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: programming pneumatics

With the switch connected to a digital INput (other side to ground), you write code like

If (Dig_In_x) equals 1
Set (Spike_Relay_X) to ON
ElseIf (Spike_Relay_X) is OFF

And check it every loop.

DO NOT SET THE COMPRESSOR TO ALWAYS ON, you'll exceed a safe pressure and pop the release valve. You MUST control the compressor, inspectors look for this.

(You need to write real code for this)
__________________

I am N2IRZ - What's your callsign?
  #3   Spotlight this post!  
Unread 31-01-2008, 22:33
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: programming pneumatics

In the default code there is an area that shows how to map out the relays pretty well.

Code:
 /*---------- Buttons to Relays----------------------------------------------
  *--------------------------------------------------------------------------
  *  This default code maps the joystick buttons to specific relay outputs.  
  *  Relays 1 and 2 use limit switches to stop the movement in one direction.
  *  The & used below is the C symbol for AND                                
  */
  relay1_fwd = p1_sw_trig & rc_dig_in01;  /* FWD only if switch1 is not closed. */
  relay1_rev = p1_sw_top  & rc_dig_in02;  /* REV only if switch2 is not closed. */
  relay2_fwd = p2_sw_trig & rc_dig_in03;  /* FWD only if switch3 is not closed. */
  relay2_rev = p2_sw_top  & rc_dig_in04;  /* REV only if switch4 is not closed. */
  relay3_fwd = p3_sw_trig;
  relay3_rev = p3_sw_top;
  relay4_fwd = p4_sw_trig;
  relay4_rev = p4_sw_top;
  relay5_fwd = p1_sw_aux1;
  relay5_rev = p1_sw_aux2;
  relay6_fwd = p3_sw_aux1;
  relay6_rev = p3_sw_aux2;
  relay7_fwd = p4_sw_aux1;
  relay7_rev = p4_sw_aux2;
  relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
  relay8_rev = 0;
Follow the format that they show there except with whatever you are doing. The cable that you have from the pressure switch goes in whichever port is here
Code:
relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
So with it in the default format you would have your compressor in port 8 and the pwm cable that you have on your pressure switch to digital IO 18. Also I found out that with us, only relay_fwd did anything with the pistons. I don't know if that will be different for you or not.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #4   Spotlight this post!  
Unread 01-02-2008, 09:45
Aarnat's Avatar
Aarnat Aarnat is offline
Senior Captain
AKA: Aaron
FRC #2199 (Robo-Lions)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Eldersburg, MD
Posts: 24
Aarnat will become famous soon enoughAarnat will become famous soon enough
Re: programming pneumatics

Hi all,
This is 2199's first year working with pnumatics. Yesterday we put our "pnumatics board" on last years robot for testing purposes. Prior to yesterday, we had been testing the the compressor and such directly off the battery (of course with fuses etc. so we didn't fry anything) so we know it works. We wired things up with a spike according to the code:

Quote:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
We have Relay 8 for powering the compressor (and plugged into relay 8 on the board) and Pressure sensor plugged into Digital I/O 18 for turning the spike on and off. We measured the voltage with a multimeter and saw 12 volts go into the spike and not coming out to power the compressor. We even told the spike to always be on, but 12 volts still never came out of the spike. We even moved the wires over to another spike and the same thing happened.

Can you tell us what we are missing? Thanks
  #5   Spotlight this post!  
Unread 01-02-2008, 10:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: programming pneumatics

Quote:
Originally Posted by Aarnat View Post
We even told the spike to always be on, but 12 volts still never came out of the spike.
Did the LED on the Spike do anything?

You did have an OI connected via tether or radio, right?
  #6   Spotlight this post!  
Unread 01-02-2008, 11:05
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: programming pneumatics

Did you check the fuse on the Spike or better yet replace it with a 20a snap-action breaker?

Did you set relay8_rev = 0 somewhere?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #7   Spotlight this post!  
Unread 01-02-2008, 14:54
Aarnat's Avatar
Aarnat Aarnat is offline
Senior Captain
AKA: Aaron
FRC #2199 (Robo-Lions)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Eldersburg, MD
Posts: 24
Aarnat will become famous soon enoughAarnat will become famous soon enough
Re: programming pneumatics

To Alan Anderson,
The LED on the spike stayed orange the whole time. We inserted a printf statement to look at what was being sent out to the spike and we kept the programming cable on the robot and watched the terminal window. A 1 was sent to relay8_fwd. (1 is on 0 is off right?) Still, Nothing happened to the spike.

To Mark McLeod,
We did check the fuses and they were perfectlly fine.
Yes, right under the
Quote:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
was the
Quote:
relay8_rev = 0;
Is there any other place other than user_routines.c in the default code that relay8_rev or relay8_fwd would change?

Thanks!!!
  #8   Spotlight this post!  
Unread 01-02-2008, 16:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: programming pneumatics

It sounds like your robot controller is disabled. Again, do you have an OI attached, either by tether or by radio? Do you have a disable switch connected to the competition port that's turned on by mistake?

What do the lights on the Robot Controller show you?
  #9   Spotlight this post!  
Unread 01-02-2008, 22:03
Aarnat's Avatar
Aarnat Aarnat is offline
Senior Captain
AKA: Aaron
FRC #2199 (Robo-Lions)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Eldersburg, MD
Posts: 24
Aarnat will become famous soon enoughAarnat will become famous soon enough
Re: programming pneumatics

Alan Anderson,
Actually, we have two ways to disabel our robot.
When we were improving our one stick driving code earlier, we put in a failsafe to stop the robot to neutral (and it came in handy on several occasions needless to say). We have to hold down one of the buttons on the joystick to enable the robot to move.

We also recently made a dongle for "emergency stop", "autonomous", and "regular driving".

I'm very sure we enabled the robot through the dongle, but not sure about our origional failsafe. I am very sure the failsafe was only for the drive motors and our failsafe would have shown up on our teminal because we put a printf statement that would have indicated that it was disabled. I don't remember without looking at the code and/or the robot.

I have been constantly emailing with the rest of the team and, after seeing some diagrams on wiring, they are also thinking the thing is wired incorrectly. Tomorrow the team will be figuring out why the pnumatics arn't working, and I'll bring the failsafe up. When we figure this out I'll obviously write to tell ya'll about what the problem was.

Last edited by Aarnat : 01-02-2008 at 22:05.
  #10   Spotlight this post!  
Unread 02-02-2008, 22:03
Aarnat's Avatar
Aarnat Aarnat is offline
Senior Captain
AKA: Aaron
FRC #2199 (Robo-Lions)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Eldersburg, MD
Posts: 24
Aarnat will become famous soon enoughAarnat will become famous soon enough
Re: programming pneumatics

Hi all,
I found the problem. Some how the "relay8_rev = 0;" was deleted. I put it back in the code and the compressor and preasure switch are now working flawlessly! Thanks for the help!
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 Reaper40 Pneumatics 17 02-02-2008 07:55
programming the pneumatics Armando Programming 2 17-02-2007 21:47
Programming Pneumatics? itzrobz Programming 2 20-01-2007 00:30
Programming of Pneumatics Ben Piecuch Programming 3 18-02-2005 02:39
Pneumatics Programming KWalsh Programming 8 19-02-2004 09:17


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

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