Go to Post Yippee! Someone else that can have their every word over-analyzed, mis-read, inverted, converted, perverted, misinterpreted, reverted, and garbled besides just me! - dlavery [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 29-01-2010, 20:33
chsrobotics3283's Avatar
chsrobotics3283 chsrobotics3283 is offline
Registered User
FRC #3283 (Clarksburg Robotics)
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clarksburg, Maryland
Posts: 41
chsrobotics3283 is an unknown quantity at this point
Programming Servos.

Hi I'm using the servos given in the kit of parts; one to move up and down and another to turn 200 degrees approximately. I plugged one servo into PWM 6 on the Digital Sidecar and one servo to PWM 5. The problem is when I press the button 3 on the joystick, the whole robot turns instead of the servo's moving the camera. How do I change the programming to move the servos by itself instead of the motors? And the camera is able to track the target.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2010, 08:42
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: Programming Servos.

If your motors are on PWMs 1 and 2, then what you describe is exactly what the 2010 Game Robot Project is designed to do.

To see how to control the camera tilt/pan assembly instead of the drive motors, take a look at the Servo Camera Example (or the slightly more complex Track Two-Color Target Example).
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2010, 11:48
chsrobotics3283's Avatar
chsrobotics3283 chsrobotics3283 is offline
Registered User
FRC #3283 (Clarksburg Robotics)
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clarksburg, Maryland
Posts: 41
chsrobotics3283 is an unknown quantity at this point
Re: Programming Servos.

I forgot to mention that we have 4 motors. But yea thanks for the help. But to clarify the camera is not supposed to move at all?
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2010, 17:56
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: Programming Servos.

Button 3 is programmed to move the robot's PWM 1 and PWM 2 (or however you set it up) through the motor controllers, not any servos. You need to add in the code to move the servos yourself if you want that functionality. So yes, by default, the camera is not supposed to move at all.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2010, 19:27
chsrobotics3283's Avatar
chsrobotics3283 chsrobotics3283 is offline
Registered User
FRC #3283 (Clarksburg Robotics)
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clarksburg, Maryland
Posts: 41
chsrobotics3283 is an unknown quantity at this point
Re: Programming Servos.

Where would I go to program the servos to move the camera, thats where I am lost.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2010, 20: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: Programming Servos.

Quote:
Originally Posted by chsrobotics3283 View Post
Where would I go to program the servos to move the camera, thats where I am lost.
See my first answer to your question.
Reply With Quote
  #7   Spotlight this post!  
Unread 31-01-2010, 19:42
chsrobotics3283's Avatar
chsrobotics3283 chsrobotics3283 is offline
Registered User
FRC #3283 (Clarksburg Robotics)
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clarksburg, Maryland
Posts: 41
chsrobotics3283 is an unknown quantity at this point
Re: Programming Servos.

so this is what I did so far:

Under Begin. vi-
1. I wired a Servo Open. vi to the element thingy from a Servo RefNum Registry Get.vi which takes all the error outs and makes it into one wire to the main wire out

Under Telop. vi-
1. I wired a Servo RefNum Registry Get .vi to the cage.

Now this is how I am confused, suppose if I wanted the camera to move left with 5 (on joysitck) and move right with 6. How would I configure the buttons on the joystick to do so? I want the camera to able to track the target with the motors and the servos. By the way I am keeping button 3 which turns the robot.
Reply With Quote
  #8   Spotlight this post!  
Unread 31-01-2010, 19:58
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: Programming Servos.

Quote:
Originally Posted by chsrobotics3283 View Post
Under Begin. vi-
1. I wired a Servo Open. vi to the element thingy from a Servo RefNum Registry Get.vi which takes all the error outs and makes it into one wire to the main wire out
I assume you meant Set, not Get.
Quote:
Under Telop. vi-
1. I wired a Servo RefNum Registry Get .vi to the cage.
The "cage"? I don't understand.
Quote:
Now this is how I am confused, suppose if I wanted the camera to move left with 5 (on joysitck) and move right with 6. How would I configure the buttons on the joystick to do so?
Servos are controlled by commanding them to a position. This differs from motors which are controlled essentially by setting their speed.
What you could do is get the current position of the servo and run that value into a case block controlled by Button 5. In the "true" case, subtract one from the value; in the "false" case run it straight through. Take the output from the case and run it through another similar case controlled by Button 6. Use the output of the second case to set the new position of the servo.

There are other ways to do this, like using a Comparison Select vi, or converting the Button boolean to an integer and either adding or subtracting. It depends on how concise (and how cryptic) you want to make your code.

Quote:
I want the camera to able to track the target with the motors and the servos. By the way I am keeping button 3 which turns the robot.
Tracking the target using both motors and servos is a vague requirement. In order for me to help you, I will need to know more precisely what it is you want to do.
Reply With Quote
  #9   Spotlight this post!  
Unread 31-01-2010, 20:08
chsrobotics3283's Avatar
chsrobotics3283 chsrobotics3283 is offline
Registered User
FRC #3283 (Clarksburg Robotics)
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Clarksburg, Maryland
Posts: 41
chsrobotics3283 is an unknown quantity at this point
Re: Programming Servos.

So when I meant: "I want the camera to able to track the target with the motors and the servos. By the way I am keeping button 3 which turns the robot."

I meant that I want the robot to be able to position itself using the tracking system by pressing the button 3 (the very first post I posted on this thread). Not only do I want this feature with the button 3, but I want the camera to be able to move left, right, up, and down. I want these functions to be programmed to buttons on the joystick.

Do you understand a little about what I am trying to do? In general I want the robot to be able to do what it is doing right now and the camera to move up, down, left, right.

P.S. I did mean Set instead of Get. My mistake.
Reply With Quote
  #10   Spotlight this post!  
Unread 31-01-2010, 20:47
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: Programming Servos.

Quote:
Originally Posted by chsrobotics3283 View Post
Do you understand a little about what I am trying to do? In general I want the robot to be able to do what it is doing right now and the camera to move up, down, left, right.
What the robot does right now assumes that the camera is pointing firmly in a constant direction relative to the robot chassis. Manually controlling the camera's pan and tilt violates that assumption. Please think carefully about what you are asking and how you can resolve the contradictory requirements.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Servos on ROBOTC? megaman295 Programming 1 27-01-2010 16:43
Shuper Shifter servos hookup and programming MiniNerd24 General Forum 4 30-01-2008 21:59
Servos? PrincessJae Motors 15 26-01-2008 01:33
Programming Servos For AndyMark Transmission de_ Programming 6 30-01-2007 08:52
servos Thadanator Motors 13 04-05-2005 16:57


All times are GMT -5. The time now is 11:55.

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