Go to Post I want to win, but I want to beat my opponent when they are at their best. - wilsonmw04 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 22-02-2016, 22:35
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Help programming pneumatics

This is our teams first time using pneumatics. We have everything hooked up but are having issues with the programming part. We would like the piston to extend when button "A" is pressed and retract when button "A" is released. How would we achieve this. Thanks in advance!
Reply With Quote
  #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
  #3   Spotlight this post!  
Unread 22-02-2016, 23:57
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Re: Help programming pneumatics

Quote:
Originally Posted by Alan Anderson View Post
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.
Will you be able to post snippets tomorrow? I'm still learning LabVIEW. Thanks for the help.
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


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

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