Go to Post We'll defenestrate our programmer, and I'll report back our solution if we get anything working. - Nick Seidl [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 11-04-2016, 16:12
snotsdelta snotsdelta is offline
Registered User
FRC #6056
 
Join Date: Mar 2016
Location: Rothsay
Posts: 15
snotsdelta is an unknown quantity at this point
Button Programming

We want to run a motor through a button, preferably the trigger. How would I program this? We are using labview 2015.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-04-2016, 16:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Button Programming

Quote:
Originally Posted by snotsdelta View Post
We want to run a motor through a button, preferably the trigger. How would I program this? We are using labview 2015.
Describe how you want the button to behave.

Example1:
Press and release button to toggle motor between "full on" and "off".

Example2:
When button is held pressed, motor runs. When button is released, motor stops.

etc.

You get the idea.




Reply With Quote
  #3   Spotlight this post!  
Unread 11-04-2016, 16:21
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,731
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: Button Programming

Here's an example using two buttons (forward/reverse/off).
Just use a single button if the motor is only forward/off.

http://www.chiefdelphi.com/forums/at...6&d=1454729278
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 11-04-2016, 21:36
snotsdelta snotsdelta is offline
Registered User
FRC #6056
 
Join Date: Mar 2016
Location: Rothsay
Posts: 15
snotsdelta is an unknown quantity at this point
Re: Button Programming

Quote:
Originally Posted by Ether View Post
Describe how you want the button to behave.

Example1:
Press and release button to toggle motor between "full on" and "off".

Example2:
When button is held pressed, motor runs. When button is released, motor stops.

etc.

You get the idea.




We would want example 2. When the trigger is pressed it goes at full power, and when released it stops. Thank you!
Reply With Quote
  #5   Spotlight this post!  
Unread 11-04-2016, 21:51
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Button Programming

Quote:
Originally Posted by snotsdelta View Post
We would want example 2. When the trigger is pressed it goes at full power, and when released it stops. Thank you!
See the link Mark provided in Post#3. If you need further help, ask Mark politely and I'm sure he will help.


Reply With Quote
  #6   Spotlight this post!  
Unread 12-04-2016, 10:17
snotsdelta snotsdelta is offline
Registered User
FRC #6056
 
Join Date: Mar 2016
Location: Rothsay
Posts: 15
snotsdelta is an unknown quantity at this point
Re: Button Programming

Sounds good Thank you Ether

Mark I noticed that the example you posted was from the 2014 version of labview. Will it work for the 2015 version?
Reply With Quote
  #7   Spotlight this post!  
Unread 12-04-2016, 10:21
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,731
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: Button Programming

Yes it works in both. There was no change in the LabVIEW version upgrade that affected this.
You can save that image to your desktop, then drag it onto an open block diagram, and the code will appear.
Then edit to remove the extra button.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #8   Spotlight this post!  
Unread 12-04-2016, 10:48
snotsdelta snotsdelta is offline
Registered User
FRC #6056
 
Join Date: Mar 2016
Location: Rothsay
Posts: 15
snotsdelta is an unknown quantity at this point
Re: Button Programming

Sounds great. Thank you Mark!
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:24.

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