Go to Post The best teams have students who genuinely enjoy scouting and the alliance selection process. - Jay O'Donnell [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 06-02-2012, 15:56
TeacherWeeks TeacherWeeks is offline
Registered User
FRC #3706
 
Join Date: Jan 2012
Location: Detroit Mi
Posts: 3
TeacherWeeks is an unknown quantity at this point
Unhappy Servo motor help

Hello,
I'm the lead programmer for team 3706. Its my first year so i need a little help. I was wondering on how you add buttons to the servo motors in the program. I already put the three servo motors i need in the begin and finish sections.I just don't know how to add it to the teleop section. I want my joystick2 to control three motors that will move a arm on the robot.

Thank you
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2012, 21:31
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: Servo motor help

Can you give a little more detail about what you want the joystick to do? Which controls on the joystick should cause what actions to occur on the servos?
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2012, 12:39
TeacherWeeks TeacherWeeks is offline
Registered User
FRC #3706
 
Join Date: Jan 2012
Location: Detroit Mi
Posts: 3
TeacherWeeks is an unknown quantity at this point
Re: Servo motor help

We are working on getting our arm working. For example we want the trigger button to move the arm up once squeezed and move it down when squeezed a second time. Our arm is being driven by the set of window motors from the KOP.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2012, 15:06
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,188
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Servo motor help

Quote:
Originally Posted by TeacherWeeks View Post
We are working on getting our arm working. For example we want the trigger button to move the arm up once squeezed and move it down when squeezed a second time. Our arm is being driven by the set of window motors from the KOP.
window motors aren't servos, they're just normal motors being used in a servomechanism. As such, you should be controlling them through a victor or a jaguar as you would a drive motor. Then you would add on the position feedback and control on top of that.
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 07-02-2012, 21:40
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: Servo motor help

If you want a single trigger squeeze to move the arm to a specific position, you'll need a way for the program to know when the arm is at that position. What will you be using to do that?
Reply With Quote
  #6   Spotlight this post!  
Unread 07-02-2012, 22:41
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Servo motor help

As Alan said, you'll need to have some type of sensor which supplies feedback based on a setpoint. For example, if you are reading the angle of an extension with a single pivot point, a potentiometer, gyroscope, or encoder will suit your needs.

In this example, you'd read the output, and evaluate if it's the value you want (or at least within a range of values). If it's not, you'll have to set the motor output of the motor controlling the extension to move in either direction, based on the magnitude of your error.

If you are controlling a servo, you can use the Servo Set Angle or Servo Set Position function within the WPI Robotics Library to set the servo to a specific angle or position upon the press of a button.
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2012, 00:39
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,188
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Servo motor help

Quote:
Originally Posted by DominickC View Post
As Alan said, you'll need to have some type of sensor which supplies feedback based on a setpoint. For example, if you are reading the angle of an extension with a single pivot point, a potentiometer, gyroscope, or encoder will suit your needs.

In this example, you'd read the output, and evaluate if it's the value you want (or at least within a range of values). If it's not, you'll have to set the motor output of the motor controlling the extension to move in either direction, based on the magnitude of your error.

If you are controlling a servo, you can use the Servo Set Angle or Servo Set Position function within the WPI Robotics Library to set the servo to a specific angle or position upon the press of a button.
It is actually a lot simpler than that. The sensors you are looking for are limit switches. You need one that is triggered when the arm is up, an another that is triggered when the arm is down. Squeeze once and have the arm move up until the switch is turned off (normally on is a much better configuration than normally off). Squeeze it a second time and the arm moves down until the other switch is turned off.
__________________
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 08:49.

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