Go to Post I know my posts are sometimes exhausting but there are PICTURES in this one, if that helps at all. - Jaine Perotti [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 21-02-2011, 16:35
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
speed change in teleop

how do i change the speed of these motors, in this teleop vi, can you edit it and reply with the edited version or explain it to me.
Attached Files
File Type: vi Teleop.vi (22.2 KB, 19 views)
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2011, 17:32
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: speed change in teleop

Which motor do you want to change speed of? I see Joystick 1 tied to two different motor definitions. This alone is a problem. You need only one of them. Make sure whatever one you choose has also been defined in the 'begin.vi'

You have motor definitions for 'arm' and 'hand' and are controlled from buttons on Joystick 1. You have the motor speed hardwired for both at .125. Are these the ones you want to change the speed of? You can just change the value of .125 to another value between 0 - 1. This of course is hardwired though and can't be changed while the program is running. You could tie another Joystick to these axis if you need variable control while code is running.
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2011, 17:36
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: speed change in teleop

this is great, but the arm is our shoulder, why is it a problem to have 2 motors wired to joystick 1.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #4   Spotlight this post!  
Unread 21-02-2011, 22:27
Clayton Yocom's Avatar
Clayton Yocom Clayton Yocom is offline
Programming Mentor
FRC #0027 (RUSH)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Clarkston, MI
Posts: 87
Clayton Yocom will become famous soon enoughClayton Yocom will become famous soon enough
Send a message via AIM to Clayton Yocom Send a message via MSN to Clayton Yocom Send a message via Yahoo to Clayton Yocom
Re: speed change in teleop

Quote:
Originally Posted by Ian McShane View Post
this is great, but the arm is our shoulder, why is it a problem to have 2 motors wired to joystick 1.
Okay, leme break down what he is saying.

Your begin.vi from another thread has this.

This, in its current state, is broken. What are you trying to do? Do you have two left and right drive motors? Or are you trying to drive your arm using Drive commands? If the second, your doing it incorrectly, as that is not what the drive vi's are made for.

Secondly, this is what your code looks cleaned up a bit (teleop)

Your controling two drive vi's with the same axis values. If you are using 4 motors for drive use this in begin and this in teleop.

If you are indeed controling your arm using button feedback, I'd consider using this. It uses the trottle control on the joystick to set speed and uses buttons two and three for down/up.

If you have any questions, let me know. I'll be sure to answer within the next day or so.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-02-2011, 23:26
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,113
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: speed change in teleop

Quote:
Originally Posted by Ian McShane View Post
how do i change the speed of these motors,...
Be more specific about what you want, please. Do you want the speed to change during the match based on driver input? Do you want the speed to be constant, but just something other than what it is now? If so, do you want it to be faster than it is now, or slower?

Pretend we don't know anything about your robot or your controls - which is pretty close to the truth. Explain to us in plain English what you want the driver to do, and what you want the motors or servos or pneumatic cylinders on the robot to do as a result.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-02-2011, 17:19
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: speed change in teleop

Ok, How would i change the speed of the arm and hand motors so if i used a joystick i would not have to push it a fraction of an inch and have it move a million mph, or just slow down the definite speed if i was using a button.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #7   Spotlight this post!  
Unread 22-02-2011, 18:55
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: speed change in teleop

and would i use a numeric value of one if i wanted to return the speed to normal?
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #8   Spotlight this post!  
Unread 22-02-2011, 19:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: speed change in teleop

I'd encourage you to look through the code and find the place where the "too fast" motor is being updated. Right click and probe it and get a sense of what values are being sent. Also, be gentle with the joystick and determine what upper it is that you'd want to send. Now change the code to turn the -1 to 1 value into the "-slow value", and "slow value". Keep probing as you insert a multiply by a number less than one or a divide by a number greater than one. Be sure to make all values default when you are happy with it.

Note that this is not a good solution to fix a gear ratio that is way off, but if there isn't much load on the motor, it will make your drivers way more successful.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 01-03-2011, 15:47
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: speed change in teleop

is there a number input that makes it go backwards, because that is what i thought - values do.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #10   Spotlight this post!  
Unread 05-03-2011, 02:34
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: speed change in teleop

You can wire a -.5 constant to the run motor vi and it will spin backwards at half speed for the entire time teleop is enabled. That is probably not what you want.

You can divide your joystick value by 2 and wire that output to the run motor vi. This will make it so that the motor will never run at full speed, and will make it so that moving the joystick a quarter of the way forward will make the motor turn at 1/8 speed.

You can cube your inputs. This will make it so that you have finer control over the lower values (so moving the joystick halfway will have the motor turn at .5*.5*.5 = .125 = 1/8 speed), but still let you have full range of motion (because 1 * 1 * 1 = 1). You can also square it, but then you have to worry about preserving the sign (because squaring makes everything positive).

To make the motor turn backwards when you move the joystick forward, you can just add in a "negate" (named incorrectly, should be negatize) command between the axis and the run motor vi.

By saying "How do I change the speed of the arm" the correct answer is to move the joystick to a different position. What you should probably say (assuming I'm reading you correctly) is "How do I change the sensitivity of the joystick so that it (Has a lower max speed/is nonlinear)" or "How do I reverse the direction of a motor?"

Figuring out exactly what you want done is the majority of programming. The chassis folks tell you they want the robot to move, and you have to know that that means you need to have the x axis of the joystick control the turning rate, defined by this algorithm... et cetera.

Try to do that, and we can help you on how to do it. Alternatively, if you don't know exactly what you want done, you can post some detailed descriptions of how everything is configured (such as: "there's a motor controlling one arm, and then on that arm there's another motor controlling another arm, similar to how a human arm works. How should I go about programming this to take in a height and make the end of the arm go to that place?") and we can help you with that too. However, saying really vague things ("my robot doesn't work" "How do you run an arm?") makes it harder to help you.
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