Go to Post Remember there are many eyes watching and often you are judged by what you say and how you say it. - Mike Martus [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 19-02-2010, 17:44
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Pneumatics Code Questions

Hey everybody,

I have two questions about the pneumatics code in C++. First of all, when you are initializing the solenoids with the "s = new Solenoid(x, y)" statement, what are the two arguments 'x' and 'y'? One of them is clearly the digital port on the cRIO but what is the other and what is the order of them?

Also, on the cRIO, one of the PLCs (or whatever they are called) is made for the solenoid ports. Which slot does this go into on the cRIO board?

Thanks for the help!
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2010, 18:31
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: Pneumatics Code Questions

The solenoid module goes into slot 8 on the cRIO by default. If you have a second solenoid module, put that into slot 7. Every solenoid connected to one module has to operate on the same voltage e.g. all 12V or all 24V.

Code:
  Solenoid *m_solenoid_1;

...


  m_solenoid_1 = new Solenoid(1);
That code assumes the solenoid module is in slot 8. You only need to two argument version if you are also using slot 7.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2010, 18:36
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Pneumatics Code Questions

for a solenoid on module 8, connected to the first set of pins, Solenoid(8,1), or you can abbreviate it Solenoid(1) if it is on module 8
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2010, 10:16
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Pneumatics Code Questions

thanks so much for the help everybody

Last edited by dnrobotics11 : 20-02-2010 at 10:45.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pneumatics Code dnrobotics11 C/C++ 5 15-02-2010 19:29
Pneumatics Code nighterfighter C/C++ 16 12-10-2009 17:52
questions regarding <R73> [pneumatics rules] smcmahon Rules/Strategy 3 16-02-2009 12:47
Pneumatics Questions RAWdealer59 Pneumatics 1 17-02-2003 12:10
Pneumatics parts list questions archiver 2000 1 23-06-2002 22:48


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

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