View Single Post
  #2   Spotlight this post!  
Unread 22-02-2016, 23:54
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 programming pneumatics

What you want to do is Open a solenoid in Begin, selecting the PCM channel(s) it is connected to, and save its device reference with an appropriate name using the solenoid RefNum Set function. Then in Teleop, read the button value -- it will be a boolean. Use a RefNum Get to retrieve the device reference and pass it to the solenoid Set function. Use the boolean button value to select between Forward and Reverse (or Off, if it's a single solenoid instead of a double one).

I'd post snippets of LabVIEW code here if I had it installed on this computer.
Reply With Quote