View Single Post
  #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