View Single Post
  #5   Spotlight this post!  
Unread 11-12-2013, 14:07
Domenic Rodriguez's Avatar
Domenic Rodriguez Domenic Rodriguez is offline
Registered User
FRC #0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Grove City, PA
Posts: 213
Domenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura about
Re: Beginner FRC Java Programmer - Help

Quote:
Originally Posted by otherguy View Post
...
The Solenoid class(es) and the Relay class can both be used to achieve motion of a pneumatic cylinder. The difference between them is in the type of hardware each one controls.

As you noted, the Relay class controls a Spike. The Spike would have it's M+ and M- terminals connected to the red wires on the solenoid (assuming the valve has two solenoids on it). The black wires from the two solenoids would be tied together and brought back to the power distribution board or DSC ground.

The Solenoid and DoubleSolenoid classes take the spike out of the equation. They control the same solenoid valve hardware, but through the NI relay module (9472), which resides in the 3rd slot of the cRIO.
...
From my understanding, you would use either a Relay or the Solenoid class, but not both. Is that correct? Assuming the OP's solenoid valve is wired to a Spike Relay, the code should work but the Solenoid instance "piston" is not serving any purpose and could be removed.

hasin5, could you describe your wiring setup? That way we won't have to continue to make assumptions about it.
__________________

LuNaTeCs - Learning Under Nurturing Adults Teaching Engineering Concepts and Skills - Small and Mighty!

FRC 316 LuNaTeCs - Student (2011-2014), Lead Programmer (2011-2014), Team Captain (2013-2014), Operator (2013), Drive Coach (2014), Mentor (2015-????)
'11 Philly Regional Finalists, '13 Chestnut Hill Finalists, '13 Lenape Champions, '13 Archimedes Division, '14 Chestnut Hill Champions, '14 Lenape Champions
FTC 7071 EngiNerds - Founding Advisor (2013-2014) | FRC 5420 Velocity - Founding Advisor (2015)
Grove City College Class of '18, Electrical/Computer Engineering (B.S.E.E)

Reply With Quote