Track position of Zaber device when moving it

I am writing a LabVIEW VI to move a Zaber linear actuator and I want to record the position of the device every few milliseconds as it moves.

I installed the Zaber LabVIEW driver and used its examples to make my drive move, but how can I read the position during these moves?

+3


source to share


2 answers


There are three options for tracking the position of one of our devices while moving: interpolate from the start and end points, poll the position with a timer, or turn on the device mode that reports the location every 250ms. Examples showing the second and third options can be downloaded from our website .

The easiest way is to simply interpolate the position based on where the movement started and stopped. If your acceleration is fast enough, then this makes a good first try. Sources of errors are acceleration and deceleration at the start and end of a movement, as well as delay in serial communications.

The next option is to use a timer and query the device position every few milliseconds. The advantage is that the time is flexible. You can set the update period to whatever you want. Of course, serial communication limits how quickly you can request a position. In theory, you can go down to about 12ms, but 15ms will give you some breathing room.



enter image description here

The last parameter is to enable device mode, which sends a position update every 250ms. The advantage is that the time is slightly more accurate as you only have communication latency in one direction. In later A series devices, you can change the refresh period, but T series devices always use 250ms.

enter image description here

+2


source


One problem with Zaber motors is that serial communication only works at 9.6 kbps (that's about 1 byte per millisecond). Motors cannot tell you every few milliseconds where the engine is.

There are two solutions:

  • Create a simple mathematical model of the engine (including acceleration) and use the location information you can get (4 samples per second) to calibrate this model.

  • Add your own linear quadrature encoder.



I went with (2) because the hardware design was not 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 sticking and play as it happens!

+1


source







All Articles