Go to Post Guys wearing pink, that strikes fear into my heart now :). - Cyberguy34000 [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-2011, 19:38
captainking's Avatar
captainking captainking is offline
Level 85 Programmer
FRC #0168 (MIB)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: North Miami Beach
Posts: 41
captainking is an unknown quantity at this point
Individual Button Presses

Hey, we are running a claw on the robot and want to make it so that pressing a button opens it, and then pressing it again closes it.

We have 2 limit switches to determine whether the claw is open or closed.

Our problem is that when we hold the button down, due to it being in a loop, it constantly switches between the "closing" state and the "opening state".

How can we make it so that LabVIEW reads each button press individually instead of checking it every loop iteration?
__________________
Integrity first
Service before self
Excellence in all we do
Reply With Quote
  #2   Spotlight this post!  
Unread 19-02-2011, 19:52
dahlboy15 dahlboy15 is offline
Vice President
AKA: Dyson Dahl
FRC #3290 (Robo-Bears)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Baudette, MN
Posts: 14
dahlboy15 is an unknown quantity at this point
Re: Individual Button Presses

If I were you (and this is what I did) I would simply program the the claw so that when you press and hold the button it is open and when you release it closes. It makes it much easier to program.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2011, 19:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Individual Button Presses

Depends on whether it's a motor or a solenoid.

Here's a single action per button press.
Here's a generic button toggle
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2011, 21:19
captainking's Avatar
captainking captainking is offline
Level 85 Programmer
FRC #0168 (MIB)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: North Miami Beach
Posts: 41
captainking is an unknown quantity at this point
Re: Individual Button Presses

Mark, you have my undying gratitude, this has been a thorn in our side for a while now
__________________
Integrity first
Service before self
Excellence in all we do
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2011, 07:33
MattCarey3625's Avatar
MattCarey3625 MattCarey3625 is offline
#3625 Programming and Wiring Head
FRC #3625 (Some Assembly Required)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Virginia Beach, VA
Posts: 23
MattCarey3625 is an unknown quantity at this point
Re: Individual Button Presses

We are using analog voltage to limit and to determine open and closed we are using case structures instead of while loops for the actual commands.
__________________
matt@hp-mini-110$> sudo make robot
sudo pass for matt:
unable to make robot
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 20:30.

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