Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Pneumatics Code Questions (http://www.chiefdelphi.com/forums/showthread.php?t=83106)

dnrobotics11 19-02-2010 17:44

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!

oddjob 19-02-2010 18:31

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.

byteit101 19-02-2010 18:36

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

dnrobotics11 20-02-2010 10:16

Re: Pneumatics Code Questions
 
thanks so much for the help everybody


All times are GMT -5. The time now is 13:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi