3

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?

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
  • Is it possible to do something like this before the devices have been homed? My understanding is that the position data is invalid until the devices have been homed. – Derek Mar 04 '13 at 15:11
  • 1
    The short answer is that you *can* do this before the devices have been homed, and you will just be measuring relative position instead of absolute position. For the long answer, [contact Zaber support](http://www.zaber.com/contact/). – Don Kirkby Mar 04 '13 at 22:03

2 Answers2

2

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

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
1

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!

Ken Tindell
  • 343
  • 4
  • 7
  • Adding a linear encoder is a great solution for this issue if the position is required frequently and consistently. Many newer Zaber devices come with a rotary encoder and allow you to change the serial baud rate up to 115.2 kbit/sec for faster position sampling, but still wouldn't be able to track the backlash and sticktion like a linear encoder does. – Don Kirkby Feb 24 '15 at 01:35
  • I've been told that the binary protocol for Zaber motors is now being deprecated in favour of an ASCII-based protocol. – Ken Tindell Apr 02 '15 at 09:43