Track position of a Zaber device as it moves

2.4k views Asked by At

I'm writing a LabVIEW VI to move a Zaber linear actuator, and I want to record the device's position every few milliseconds as it moves.

I've installed Zaber's LabVIEW driver and used its examples to get my actuator moving, but how can I read the position during those moves?

2

There are 2 answers

0
Don Kirkby On BEST ANSWER

There are three options for tracking the position of one of our devices during a move: interpolate from the start and end points, poll the position using a timer, or turn on a device mode that reports the position every 250 ms. Examples that demonstrate the second and third options can be downloaded from our web site.

The easiest method is to just interpolate the position based on where the motion started and stopped. If your acceleration is reasonably high, then this makes a good first attempt. Sources of error are the acceleration and deceleration at the start and end of the motion, as well as the delay in serial communications.

The next option is to use a timer and query the device's position every few milliseconds. The advantage is that the timing is flexible. You can set the update period to anything you want. Of course, the serial communication limits how fast you can query the position. Theoretically, you can get down to about 12 ms, but 15 ms would give you a bit of breathing room.

enter image description here

The last option is to turn on a device mode that sends a position update every 250 ms. The advantage is that the timing is slightly more accurate, since you only have a communication delay in one direction. In more recent A-series devices, you can change the update period, but the T-series devices always use 250 ms.

enter image description here

2
Ken Tindell On

One problem with Zaber motors is that the serial link only runs at 9.6kbit/sec (that's about 1 byte per millisecond). The motors can't tell you every few milliseconds where the motor is.

There are two solutions:

  1. Build a simple mathematical model of the motor (including acceleration) and use the position information you can get (4 samples per second) to calibrate that model.

  2. Add your own linear quadrature encoder sensor.

I went with (2) because the hardware design wasn't fixed. I used these encoders from Posic:

http://www.posic.com/default_en.asp/2-0-119-12-6-1/4-0-120-14-2-1/

They are accurate enough to actually see the sticktion and backlash as it happens!