Go to Post Having 75% of the drive train without direct connection to the transmission would make me a bit queasy, but then again, I'm not Winnovative. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2011, 21:13
Matthew Blake's Avatar
Matthew Blake Matthew Blake is offline
Registered User
FRC #3481 (Bronc Botz)
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Helotes, Texas
Posts: 43
Matthew Blake is an unknown quantity at this point
Help with WindRiver pneumatics code

Hi all, it's our rookie year in FRC and we have been struggling to figure out how to make the pneumatics run. There is no example code in WindRiver to help us figure this out; any sort of sample code or guidance would be appreciated. We have two solenoids, two outputs to the actuators, and one air input.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2011, 08:36
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Help with WindRiver pneumatics code

Here's a start http://www.chiefdelphi.com/forums/sh...ad.php?t=91789
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2011, 11:16
ScaliToast's Avatar
ScaliToast ScaliToast is offline
Registered User
FRC #0241
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: NH
Posts: 1
ScaliToast is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

You can find code examples for various robot hardware components in the "WPI Robotics Library Users Guide". Look for Pneumatics in the T-O-C. It gives an overview of the Compressor and Solenoid objects.

This document is available at the FIRST Forge site, WPI project documents section. The link is:
http://firstforge.wpi.edu/sf/docman/..._documentation


Good luck!
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2011, 18:45
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Help with WindRiver pneumatics code

Hi Teams!

Ask and ye shall receive. This is a very simple program that exercises solenoids 1-6 on slot 8 and 1-5 on slot 7 (I only had 11 buttons on my joystick). It also turns on the compressor and allows for control of the compressor. It's pretty basic, but it should give you a leg up.

Enjoy,

Mike
Attached Files
File Type: zip sample-compressor.zip (1.18 MB, 75 views)
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2011, 00:34
Matthew Blake's Avatar
Matthew Blake Matthew Blake is offline
Registered User
FRC #3481 (Bronc Botz)
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Helotes, Texas
Posts: 43
Matthew Blake is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

Thanks for this code!
Reply With Quote
  #6   Spotlight this post!  
Unread 21-03-2011, 17:50
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

hi,
I'm still confused after reading these examples. we're trying out pneumatics code also - it goes as follows:
arm_button1 = arm_stick.GetRawButton(1);
if (arm_button1)
{
s1.Set(0);
s2.Set(1);
}
else
{
s1.Set(1);
s2.Set(0);
}
I've declared s1 and s2 as Solenoids under the Class section, and initialized them as s1(1,1) and s1(1,2) in the Public section. But they are connected to pins 1 and 2 on the Digital Output Module. Which numbers in parentheses refer to the pins of the DOM? How can we trouble shoot this? we're not getting any response when we press button 1 on our joystick.
Reply With Quote
  #7   Spotlight this post!  
Unread 21-03-2011, 17:51
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

some further comments - we are getting 12 V to the Solenoid break-out - the LED is lit up.
Reply With Quote
  #8   Spotlight this post!  
Unread 21-03-2011, 18:23
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Help with WindRiver pneumatics code

If you're seeing the solenoid bumper LED come on, then you're doing everything right as far as the software is concerned. Now, you've got to trace the wiring from the bumper to the actual solenoid switch. If that's correct, you should hear a click as the the solenoid is engaged. From there, it's all about the pneumatics plumbing, pressure switch, etc. I'm not the pneumatics guy. So, once it's bits on the wire, it's a hardware problem ;-).

Mike
Reply With Quote
  #9   Spotlight this post!  
Unread 22-03-2011, 12:29
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

we're trying to use a 24V Festo solenoid for some reason, which we are switching out today.
Reply With Quote
  #10   Spotlight this post!  
Unread 22-03-2011, 14:49
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,112
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: Help with WindRiver pneumatics code

Quote:
Originally Posted by mutantblond View Post
I've declared s1 and s2 as Solenoids under the Class section, and initialized them as s1(1,1) and s1(1,2) in the Public section. But they are connected to pins 1 and 2 on the Digital Output Module. Which numbers in parentheses refer to the pins of the DOM?
The first number in parentheses is the module number. Solenoid modules are only supported in cRIO slots 8 and 7. You should probably be initializing them as s1(8,1) and s1(8,2) instead.

Last edited by Alan Anderson : 22-03-2011 at 14:57.
Reply With Quote
  #11   Spotlight this post!  
Unread 22-03-2011, 15:58
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

what are you talking about when you say the 'solenoid bumper LED'? is this different from the LED on the board showing that it's getting power? we switched out the solenoid, but it's still not 'clicking' when we press the appropriate button (1, in this case) on the joystick.
Reply With Quote
  #12   Spotlight this post!  
Unread 22-03-2011, 16:22
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

Alan, we have the solenoid valves connected to pins 7 and 8 of the solenoid break-out board. I have the Solenoid declaration for s1 and s2 in the Class section, then s1(8,1) and s1(8,2) declared in the public section - something doesn't seem right here - how does pin 7 enter into it?
Reply With Quote
  #13   Spotlight this post!  
Unread 22-03-2011, 16:51
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,112
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: Help with WindRiver pneumatics code

When you supply two numbers to a solenoid initialization, the first one specifies the module number and the second one specifies the output pin number. There are eight slots in the FRC-cRIO chassis. Slots 1 and 2 support analog input modules. Slots 4 and 6 support digital I/O modules. Slots 7 and 8 support digital sourcing modules, which are used to control solenoids. Each solenoid breakout has eight outputs, numbered 1-8 (though the eight green LEDs on the module are actually labeled 0-7, giving a potential cause for confusion).

s1(8,1) defines the solenoid object as being associated with pin 1 of the pneumatics breakout connected to a digital sourcing module in slot 8 of the cRIO.

s1(8,2) defines the solenoid object as being associated with pin 2 of the pneumatics breakout connected to a digital sourcing module in slot 8 of the cRIO.
Reply With Quote
  #14   Spotlight this post!  
Unread 22-03-2011, 17:00
mutantblond mutantblond is offline
Registered User
FRC #2523
 
Join Date: Sep 2008
Location: st. johnsbury, vt
Posts: 43
mutantblond is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

so we had the wrong module in the crio - we've now put the 9472 in - and we see the lights for pins 7 and 8 flashing as we pull the trigger on our joystick. But there's no juice getting to the solenoid. I made a type in my previous email, we're initializing s1(8,1), s1(8,2). i'm still puzzled about how this works when we've got the solenoid valves connected to pins 7 and 8.
sorry, the WPI LIB comments are not that helpful since they are using pointers. i'm not much of a C++ programmer.
Reply With Quote
  #15   Spotlight this post!  
Unread 22-03-2011, 20:24
Arthur3103 Arthur3103 is offline
Mentor Team 3103
AKA: Arthur Purpich
FRC #3103 (Iron Plaid)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Houston, TX
Posts: 6
Arthur3103 is an unknown quantity at this point
Re: Help with WindRiver pneumatics code

Are you running 12V or 24V solenoids? If 12V, you need to power the solenoid breakout from a 20A circuit from the power distribution board. If 24V, you need to power the solenoid breakout from the 24V header on the power distribution board (the same header the cRIO is powered from).

If you are powered properly: each solenoid has a manual button. Press the button with a small screwdriver or other pointed object. If the solenoid works, it is getting air and electrical power -- the problem is in your code. If the solenoid does not work, or no lights light up, you probably have a wiring problem. Have you done a continuity check of your wiring? Try reversing the two-wire connector on the solenoid breakout.

Good luck.
Reply With Quote
Reply


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


All times are GMT -5. The time now is 08:44.

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