Andrew Xiang wrote:
> 
> I am doing a project that turns a lens using a servo motor for about 10mm
> and take 10K readings in the interval. When the lens turns, it direct
> different light into a detector and I take
> reading from the A/D that is connected to the detector. The whole process
> should take only about
> 1-2 seconds or less.

The time that takes to turn your servomotor depends on the load and the
size
of the motor.  The load is made of actual lens load + the acceleration
load.
Is like moving a fast car with a 100 lbs load for one mile, takes less
than 
moving 1000 lbs with the same car.  Or, if you use a town truck to move
the same loads you get different timings.  As an extreme, a small lense
on a 
"galvo" (short for Galvonometer) can rotate a small lens in
microseconds.
> 
> I have 2 ideas.
> 1. First idea is to move the servo to a position, wait it for settle, and
> then take reading; then repeat for 10K times. I suspect this will take too
> long, like couple minutes.
> Does anyone know how long it takes to move the Servo motor couple um and
> settle?
> 
> 2. Second is to do a scan, start move the motor, get the encoded locations
> from the SERVO, and take A/D readings as fast as I can. This solves the
> speed
> problem, but how would I keep track the location I was in when I took the
> reading. Even I have encoded location returned from the SERVO, I still need
> to figure out the interval distance between the encoded location and the
> actual location
> when I took the reading?

There are some motion boards ($$$) that have hardware position capture
and
can latch a position in less than a usec.  But if your system is slow
you can use the interrupt from your pc to latch the positions and the
data
at the same time.  

Luis.
[EMAIL PROTECTED]
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to