Go to Post Those poor suckers on the West coast get three hours LESS sleep than we do afterward. Anyone else glad to see that crate go every year, regardless of what's in it? - Rich Kressly [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 19-02-2012, 11:13
jwatson12 jwatson12 is offline
Mr. Watson
FRC #1025 (Impi Warriors)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Michigan
Posts: 17
jwatson12 is an unknown quantity at this point
Locking out actions based on a button press (without using variables)

Hi All:

We have a programming puzzle where we would like to lock out certain functions when a button is pressed. For example, when opening a solenoid by pressing button 5, motor actuation assigned to axis 2 of joystick 2 (for speed control) is disabled until a different button is pressed. Then, once button 7 is pressed, control is restored. Our current solution is to use a case statement assigned to button 5 that when true sets the solenoid and then a while loop is called within the Case structure until interrupted by Button 7. The exit tunnel of the case structure then continues the opposite solenoid action.

Can someone take a look at this and tell me if this is on the right track or is there a better way?

Thanks!
Attached Thumbnails
Click image for larger version

Name:	Press Button five.png
Views:	22
Size:	25.6 KB
ID:	11987  Click image for larger version

Name:	Press Button seven.png
Views:	12
Size:	21.3 KB
ID:	11988  

Last edited by jwatson12 : 19-02-2012 at 11:17.
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2012, 18:55
Wildcats1378 Wildcats1378 is offline
Registered User
no team
 
Join Date: Jan 2012
Rookie Year: 2011
Location: hawaii
Posts: 93
Wildcats1378 is an unknown quantity at this point
Re: Locking out actions based on a button press (without using variables)

Check out the The Joystick Button Latching.vi example in Help -> Find Examples. That shows you how to use features which toggle.

Otherwise, you're on the right track!
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 04:14.

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