Applied Motion drives offer a variety of control modes, each with its own niche application. Most are intuitive and easily applied: pulse & direction, velocity, streaming commands (SCL). But sometimes these simple approaches don’t quite offer the elusive “perfect” solution. Analog positioning is one such application.
In its simplest implementation, analog positioning converts an analog control signal into a digital value, assigning that value to a physical position in terms of motor steps. Take the example of a 0-5V signal applied to an ST5 stepper drive. This analog signal will be converted to a digital equivalent of 0-16,383 (0V = 0, 5V = 16,383). The most straightforward approach would assign this number directly to a position, meaning we have a maximum travel distance of 0-16,383 steps. In this simplified example, a value of 2.5V would translate to the position of 8,192 steps from zero.
Here’s the problem: since the default setting in the drive is 20,000 steps per revolution, this gives us a maximum travel distance of about 3/4 of a revolution. Some simple modifications can be made to the drive settings to increase travel, but in practice it cannot be increased beyond a few revolutions before other issues such as electrical noise begin to degrade performance.
What if the application uses a linear slide requiring many (hundreds of) motor revolutions to traverse the entire distance? The simple conversion above would not solve the application. To address this need we have created a robust solution using a Q program. The Q program and an accompanying application note can be downloaded as a zip file from here.
The program included in the zip file performs the same conversion as described above, but allows the user to stretch that value out to an arbitrary distance, set velocity limits, and even reject electrical noise on the analog signal line (diagram). It performs true absolute positioning thanks to the simple hard-stop homing routine included in segment 1. In addition, since it only requires Q programming capability, with a little modification the program works equally well in servo systems.
The specific method used is described in the accompanying application note, and the included Q program may be used as a starting point in the user’s own application solution.
Download the Q program and application note here: http://www.applied-motion.com/sites/default/files/APPN0019_Analog-positioning-using-Q-program.zip