Go to Post Finding those students and giving them a lift up out of the sea of apathy that is constantly trying to drown them is one of the reasons I am in my profession. - Ben Mitchell [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2009, 16:00
mbone206 mbone206 is offline
Registered User
FRC #0223
 
Join Date: Jan 2009
Location: New Jersey
Posts: 59
mbone206 is an unknown quantity at this point
Question Tracking Servo motor with drive motor in Labview

I am a new mentor, also new to First Robotics and LabView. Will Appreciate support. I am using the LabView 'Two Color Servo Camera' Example to find and track Foe.

I am attempting to add a drive motor to find location of servo camera once it locks onto foe, position motor (top of robot) & align with camera location, then have drive motor track with camera servo as target moves.

The way I am trying to do this, is read back servo (x position) and drive motor setting. If servo number more positive, then the drive motor would have to turn right??, servo will have to turn left to keep tracked. Once camera sevo approaches zero (camera is centered to Robot top), I know they are aligned, now need to track motors while still locked on Foe.

Can I use the the (1 to -1) setings on motor or do I need to read the PWM location? For example, does +1 = PWM 255 (full foward)?

Is outputting '0' to servo motor the same as sending PWM 127 (Centers Motor)?

What is the best way to correlate the servo and drive motor, ie. Servo moves +.1, how much dose drive motor have to drive?

I can read PWM location using PWM-GetValue VI, would I use PWM-SetValue VI to drive motor

Thanx....
Mark
  #2   Spotlight this post!  
Unread 28-01-2009, 16:34
Jetweb Jetweb is offline
is good at making robots find walls
AKA: Jonathan
FRC #0179 (Children of the Swamp!!!)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Jupiter, FL
Posts: 213
Jetweb is a name known to allJetweb is a name known to allJetweb is a name known to allJetweb is a name known to allJetweb is a name known to allJetweb is a name known to all
Re: Tracking Servo motor with drive motor in Labview

First of all yes, the servos go from -1 (PWM 0) to +1 (PWM 255).

You sound like your on the right track as far as getting the turret im assuming to align with with servo position, but this will require a rotation sensor on the turret and some form of a control loop (lookup PID loops) to allow you to set a target positon for the motor to try and reach based on the servo position.

What I would do instead is attach the camera to the turret and then let the motor act as your servo and the you can just use the normalized_x values to run the motor which makes things a little simpler and more accurate if done right.

Im using C++ so as far as doing any of these things in LabView im not much help.
  #3   Spotlight this post!  
Unread 28-01-2009, 16:46
mbone206 mbone206 is offline
Registered User
FRC #0223
 
Join Date: Jan 2009
Location: New Jersey
Posts: 59
mbone206 is an unknown quantity at this point
Re: Tracking Servo motor with drive motor in Labview

Jetweb,

Thank you for your reply/suggestion....

Using motor as servo: Won't there be too much rotation on terret during seraching mode?
  #4   Spotlight this post!  
Unread 28-01-2009, 17:06
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,791
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Tracking Servo motor with drive motor in Labview

Yes, if you mount the camera to your turret rigidly, you'll get a lot of motion on the turret when you're searching for a target, which may not be desirable (although there certainly are designs that can make this work).

It sounds from your description that you're mounting the camera on the turret, then tracking with the camera while turning the turret until the camera servo is zero'd. As i think you've found out, controlling rotating pieces attached to other rotating pieces can be a bit tricky Instead, try moving your camera so it's not on the turret. Now it can still rotate 180 degrees about your robot, and you'll know the exact angle to another robot. from there, throw a rotary encoder on your turret and use feedback from that to turn the turret angle to match.
  #5   Spotlight this post!  
Unread 28-01-2009, 17:28
MikeZ MikeZ is offline
Registered User
FRC #0624 (CRyptonite)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Katy, TX
Posts: 21
MikeZ has a spectacular aura aboutMikeZ has a spectacular aura about
Re: Tracking Servo motor with drive motor in Labview

Mark

If you are working in Labview, the FRC Programming Guide indicates that the Servo GetPosition.vi and SetPosition.vi use values from 0.0 to 1.0, and the Servo GetAngle.vi and SetAngle.vi use angle in degrees.
__________________
Mike Zanghi
Mentor
FIRST Team 624
CRyptonite Robotics
  #6   Spotlight this post!  
Unread 28-01-2009, 17:32
mbone206 mbone206 is offline
Registered User
FRC #0223
 
Join Date: Jan 2009
Location: New Jersey
Posts: 59
mbone206 is an unknown quantity at this point
Re: Tracking Servo motor with drive motor in Labview

yes, Eagle, this is what I am trying to do and it is trickey

I will run your suggestion by my Team... My hardware guy may not like it
Closed Thread


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
Motor speed sensing with the Jaguar motor controller? mminutto FRC Control System 5 13-01-2009 18:13
[FTC]: FTC Servo-Motor Problem with Labview dnhansen FIRST Tech Challenge 1 26-10-2008 00:43
Motor to Servo itzrobz Programming 8 02-02-2006 16:11
Problems tracking with CMUCam2 in LabVIEW PhilBot LabView and Data Acquisition 5 17-01-2006 20:42
What's with the New Motor Specs for the Atwood Mobile (Chiaphua) Motor. Robb Gerber Motors 2 23-01-2002 08:58


All times are GMT -5. The time now is 20:22.

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