Go to Post The secret to this whole thing is that it's the robot that builds the team. - JohnBoucher [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 31-01-2014, 17:29
T.E.R.T.O.L.A's Avatar
T.E.R.T.O.L.A T.E.R.T.O.L.A is offline
Team Account
FRC #2513 (TERTOLA)
 
Join Date: Jan 2014
Rookie Year: 2008
Location: Minneapolis, MN
Posts: 4
T.E.R.T.O.L.A is an unknown quantity at this point
Adding Additional Servos

We (the programmers) are rookies and are having trouble figuring out LabVIEW. We have our drive system working and are moving on to programming functions. The next step is to program two servos mounted on the front of the robot. They are meant to spin opposite of each other to pull the ball up between two rods. We were looking for a example program in LabVIEW to add servos and attach them to buttons on a Attack 3 Logitech Joystick and were not able to find any such example. Does anyone here know of a simple way to add 2 servos to the VI, regulate their speed and rotation direction, and attach their use to a button (the trigger)? Any help would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2014, 19:07
Maximillian's Avatar
Maximillian Maximillian is offline
Registered User
AKA: Max Westwater
FRC #5254 (HYPE)
Team Role: College Student
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Worcester, MA; NY
Posts: 97
Maximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant future
Re: Adding Additional Servos

Quote:
Originally Posted by T.E.R.T.O.L.A View Post
We (the programmers) are rookies and are having trouble figuring out LabVIEW. We have our drive system working and are moving on to programming functions. The next step is to program two servos mounted on the front of the robot. They are meant to spin opposite of each other to pull the ball up between two rods. We were looking for a example program in LabVIEW to add servos and attach them to buttons on a Attack 3 Logitech Joystick and were not able to find any such example. Does anyone here know of a simple way to add 2 servos to the VI, regulate their speed and rotation direction, and attach their use to a button (the trigger)? Any help would be greatly appreciated.
I am a bit confused on how you are using servos. Are they actually servos or are they just motors? is it a mechanism like Ri3D team boom done?

A good resource for some examples is http://team358.org/files/programming...2009-/LabVIEW/.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2014, 19:33
Maximillian's Avatar
Maximillian Maximillian is offline
Registered User
AKA: Max Westwater
FRC #5254 (HYPE)
Team Role: College Student
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Worcester, MA; NY
Posts: 97
Maximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant future
Re: Adding Additional Servos

If you are using motors then I made something that I think should work for you.


You can change the value from one to something else if you don't want it to spin at full speed. You may also have to change which motor it is that gets multiplied by -1 if it goes backwards. You should also add the motors to the finish.vi but I didn't show that.

I have no idea what button is the trigger on an attack 3. You can either look that up or just do trial and error. It may even be that the trigger isn't a button and is an analog signal which would probably make it one of the axis values.

If you want it to make it so that every time you hit the button it changes between on and off instead of having to hold it you can use a toggle.vi which I have attached. To use this you just put it in between the button and the select.

I hope this works I am new to this stuff too but I think that this should do what you want it to.
Attached Files
File Type: vi Toggle.vi (9.7 KB, 5 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 03-02-2014, 18:02
T.E.R.T.O.L.A's Avatar
T.E.R.T.O.L.A T.E.R.T.O.L.A is offline
Team Account
FRC #2513 (TERTOLA)
 
Join Date: Jan 2014
Rookie Year: 2008
Location: Minneapolis, MN
Posts: 4
T.E.R.T.O.L.A is an unknown quantity at this point
Re: Adding Additional Servos

Thanks for the help. That website was really helpful! Yes they are motors not servos, sorry. How does one set the speed of a motor controlled by a button? Is there a rpm number somewhere that we can change?
Reply With Quote
  #5   Spotlight this post!  
Unread 03-02-2014, 19:55
Maximillian's Avatar
Maximillian Maximillian is offline
Registered User
AKA: Max Westwater
FRC #5254 (HYPE)
Team Role: College Student
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Worcester, MA; NY
Posts: 97
Maximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant future
Re: Adding Additional Servos

Quote:
Originally Posted by T.E.R.T.O.L.A View Post
Thanks for the help. That website was really helpful! Yes they are motors not servos, sorry. How does one set the speed of a motor controlled by a button? Is there a rpm number somewhere that we can change?
The way you change the speed is by changing the true value of the triangular Select function. I have it set at 1. You can change the number from anything from 1 to -1. 1 is full forward, 0 is stop, and -1 is full backwards.

Last edited by Maximillian : 03-02-2014 at 20:14.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-02-2014, 19:59
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: Adding Additional Servos

Quote:
Originally Posted by T.E.R.T.O.L.A View Post
How does one set the speed of a motor controlled by a button?
I'm not sure I understand the question. A button has only two states. If you want to set the motor's speed beyond simply "running" and "not running", you'll need some other kind of control. Usually one uses a joystick for that.

Perhaps you're asking how to change what value is sent to the motor controller when the button tells it to be "running"? That's controlled by the orange constant 1 wired into the True input of the triangular Select function in the posted code. You can make it anything from -1 to +1. If you want to be able to modify the value under driver control, the throttle input of an Attack 3 joystick is Axis 3. Wire it to the Select instead of the constant, and you can set the run speed using the throttle.

Quote:
Is there a rpm number somewhere that we can change?
To control RPM, you'll need a way to measure the RPM and some programming to change the motor output value to increase it when it's too low and decrease it when it's too high. For your application, do you really need a specific RPM, or are you just asking about being able to make it run relatively faster or slower?
Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2014, 20:19
Maximillian's Avatar
Maximillian Maximillian is offline
Registered User
AKA: Max Westwater
FRC #5254 (HYPE)
Team Role: College Student
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Worcester, MA; NY
Posts: 97
Maximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant futureMaximillian has a brilliant future
Re: Adding Additional Servos

Quote:
If you want to be able to modify the value under driver control, the throttle input of an Attack 3 joystick is Axis 3. Wire it to the Select instead of the constant, and you can set the run speed using the throttle.
Kinda off topic question but do you know if there is a list of what each button/axis of the attack 3 is in labview?
Reply With Quote
  #8   Spotlight this post!  
Unread 03-02-2014, 20:51
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,795
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: Adding Additional Servos

Here is the Attack 3 mapping

__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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 09:45.

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