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!
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.
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.
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
thanks so much for the help everybody