Go to Post But then again, no one's robot ever is fully working to how they want it before the first tournamant. - #1Transgirl1140 [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 05-02-2016, 17:48
Kitkat Kitkat is offline
Registered User
FRC #3750 (Badger Gators)
Team Role: Programmer
 
Join Date: Nov 2014
Rookie Year: 2013
Location: Minnesota
Posts: 8
Kitkat is an unknown quantity at this point
Motor Buttons

HI!!

How do I program a motor to a button? We have always used axis for motors and don't know how to use buttons for the motors. Could someone post code so I can see how it is done?

Thanks in Advance 3750!!
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2016, 18:56
Nevada Reno's Avatar
Nevada Reno Nevada Reno is offline
Registered User
FRC #5430 (Piraterobolution)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2016
Location: Pittsburg,california
Posts: 9
Nevada Reno is an unknown quantity at this point
Re: Motor Buttons

you have to use an index array connected to button wires then add a constant for the button (0 btn 1,1 btn 2,etc) I hope this helps we are stuck on pneumatics which is farther along
__________________
You have to learn the rules of the game. And then you have to play better than anyone else.
-Albert Einstein


2015 Cal Games
2016 FIRST Stronghold
2016 Cal Games
2017 FIRST Steamworks
2018 TBD
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2016, 22:28
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,703
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: Motor Buttons

You have to decide what you'd like the motors to do.
Here's one way:
Attached Thumbnails
Click image for larger version

Name:	ButtonDriveExample.png
Views:	104
Size:	22.4 KB
ID:	19986  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2016, 00:14
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,117
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Motor Buttons

It looks something like this:
Quote:
x=isbuttonpressed();
if(x) {
setmotorspeed(SPEED);
} else {
setmorospeed(0);
}
You need to put in the code for checking to see if the button is pressed, and how to set the motor speed for your motors.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2016, 01:22
orangemoore orangemoore is offline
Registered User
AKA: Roger Moore
FRC #3135 (Robotic Colonels)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Chicago
Posts: 2,307
orangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond repute
Re: Motor Buttons

Quote:
Originally Posted by rich2202 View Post
It looks something like this:


You need to put in the code for checking to see if the button is pressed, and how to set the motor speed for your motors.
FYI this is in the Labview sub-forum.
__________________
Stronghold


Student 2013-2016
3135 -- Robotic Colonels
3507 -- Robotheosis (FTC)
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 02:04.

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