1 June 2002
Online Exclusive: Synchronizing Servo Motion Axes
By Ed Novak
Understanding how motion controllers handle synchronization can save both time and headaches in the long run.
There are many multiaxis motion controllers on the market capable of synchronizing motion. Synchronous motion can be anything from the coordinated motion of two or more motion axes in position lock, to triggered motion from an external event, to slaving an axis with a master reference, as with flying shears, winders, electronic camming, and conveyor synchronizing.
In this article, I'll discuss various types of synchronized motion and implementation. Finding a single motion controller that can implement all types of synchronizing easily and quickly is often more challenging than programming the motion itself.
Electronic Gearing
Electronic gearing is by far the simplest synchronized motion. Ideally, it occurs when a slave mechanism is, count for count, position locked to a master reference at some ratio. The mechanism can be a rotary motor, linear motor, or other actuator. The reference is typically a real or virtual encoding device.
The most common example is the electronic line shaft. This device eliminates the mechanical linkage from a main shaft to one or more slave motors. In a multiaxis electronic line shaft, you can accomplish the same using four motors and a reference signal. Figure 1 shows the electronic equivalent of a single master and four slaves. The ability to change connected ratios to any or all slave motors at any time is a key feature of electronic gearing. Let's look at a simple example.
To connect four slave axes at various ratios to a master axis(0):
master=0
CONNECT(1.00, master) AXIS(1)
CONNECT(1.50, master) AXIS(2)
CONNECT(0.50, master) AXIS(3)
CONNECT(-1.25, master) AXIS(4)
'reverse motion
In some cases, we may desire to "clutch" a slave motor into gear lock (Figure 2). This provides less mechanical shock when engaging and disengaging a running line. To gear axis (2) to the master axis over 1 second:
master=0
BASE(2) 'Select the base axis
CLUTCH_RATE=1
CONNECT(1, master)
Another desired feature, and a big advantage of electronic gearing, is the ability to phase shift, or advance/retard, any axis's position while maintaining ratio lock (Figure 3). Most line shaft applications require an operator to phase shift all or some of the motors. An operator can do this using a "virtual," or software, axis and a few inputs. By performing the phase adjustment move profile on the virtual axis, it can be summed to any slave axis. The result is a position-lock incremental move added to or subtracted from the constant line speed in real time:
BASE(0) 'Master axis
ADDAX(7)'Add 7 to master
axis(0). 7 is the virtual axis
IF IN(1)=ON THEN MOVE(150)
AXIS(7) 'Add 150 counts
IF IN(2)=ON THEN MOVE(-250)
AXIS(7) 'Subtract 250 counts
IF IN(3)=ON THEN CAM(1,25,1,
1000) AXIS(7) 'Make a CAM move
For a phase correction on axis (4), we can change the reference BASE (0) to BASE (4). The phase-adjusted move made on virtual axis (7) would then be applied to axis (4).
Sometimes, having an even gear ratio such as 1:1 or 1:2.5 is neither possible nor desirable. Nonterminating ratios—e.g., 1/3 (0.33333)—will accumulate an error over time. We can solve the problem, however, by representing the ratio as two integers. Thus, it's possible to represent 0.33333 by using encoder counts as 1000/3000, where 1000 = slave movement and 3000 = master movement. The controller will calculate a new slave target each servo period that always results in a 1/3 ratio between the two, eliminating long-term drift.
MOVELINK(1000,3000,0,0,master,4)
Linear and Circular Interpolation
Applications such as pick and place, assembly, and cutters require synchronizing multiple axes to get from point A to point B at the exact same time. Additionally, cutting and gluing applications require a constant vector or path speed. In an xyz mechanism, the motion controller must calculate this path speed as functions of xy, xz, and yz motor speeds for true interpolation via Pythagoras:
High-speed pick-and-place motion can be accomplished by simple looping. Figure 4 shows an example of repeat motion for an xy grid 1,000 by 1,000 mm. "xscale" and "xmid" set the center of each subblock.
start:
'Set up grid scaling
xscale=1000/6
xmid=xscale/2
yscale=1000/6
ymid=yscale/2FOR x=0 TO 5
FOR y=0 TO 5
GOSUB pick
MOVEABS((x*xscale)+xmid,(y*yscale)
+ymid)
WAIT IDLE
GOSUB place
NEXT y
NEXT x
GOTO start
The pick-and-place motion is a series of absolute move steps designed for fast starts and stops. For contoured motion to cut or lay glue, we need to define both a path and path speed. The path can be a series of lines and arcs seamed together as one move. Figure 5 shows a gasket operation using this technique.
BASE(0,1) 'Set the Axes of interpolation
SPEED=1200 'Set vector speed (set by
axis(0))
MERGE=ON 'Merge all moves together
MOVE(0,30)
MOVECIRC(10,10,10,0,1) 'Relative arc
from last move
MOVECIRC(10,10,0,10,0)
MOVECIRC(10,10,10,0,1)
MOVE(30,0).
Coordinate Transformation
In addition to the standard one-to-one xy multiaxis interpolation, coordinate transformations allow movement to be specified in a coordinate frame of reference that doesn't correspond one-to-one with the axes.
For example, a common two-dimensional mechanism is a single-belt arrangement (Figure 6). Traditionally, the x or y motors move to produce motion in either dimension. This isn't the case in the single-belt xy system and therefore requires a transform of coordinates:
Switching to the new "frame" will allow xy motion in the new coordinate system using the same move commands. In this mode, an interpolated move of move (0,100) or move (100,0) produces motion on both motors to move the load vertically or horizontally, based on the transformed position. By defining the coordinate equations for any special mechanism (e.g., a three-axis scara robot), we can select a new frame.
BASE(0,1) 'Set the Axes of
interpolation
FRAME=2 'Set new coordinate
system
MOVE(0,100) 'Make coordinated
move in new frame
Synchronizing Events to Trigger Motion
Another common way to synchronize motion is triggering from an external event or position. Typical applications for triggered motion include feeding material from a registration mark, press feeds, and flying shears. In practice, we can use any application requiring either very accurate capturing or resetting of the encoder position on the fly for some operation thereafter, whether it be cutting, gluing, or placing.
The way a controller handles the high-speed position capture to generate motion, however, can become critical as speeds increase. Some controllers can latch the axis encoder position in hardware (1 µsec or less) for minimum delay. While the captured position is accurate to the external event, typical command generation and execution to respond to that event can take several orders of magnitude longer (up to 1 msec) or the next servo period. This simply isn't fast enough for most high-speed machines. If the start of the motion profile could be "recalibrated" to the external event, the controller could make up for time lost in command execution.
To illustrate, let's look at a hypothetical high-speed label feeder (Figure 7). A conveyor is used to transport boxes to which labels must be applied. The boxes may be irregularly spaced, and the labels must be synchronized and applied via a roll-feed mechanism at the line speed of the conveyor. A proximity sensor on the conveyor is connected to the controller's registration input to sense the leading edge of the boxes. An optical sensor on the label feeder is connected to another registration input to allow us to compensate for any slippage or positioning errors on the label feed. The labels need to be applied at a known position relative to the leading edge of the box defined by a user-specified offset called "label_pos."
On the conveyor, the boxes arrive at random times. The proximity sensor can be used to recognize the presence of a box and reset the position counter at the leading edge to zero. The ability to capture the box edge's position, then offset to zero, is key to placing the labels accurately. Therefore, after the registration event has occurred, the measured position will actually reflect the absolute distance from the start of the box.
BASE(conveyor)
REGIST(3) 'Set to look for
REG input (Box edge)
WAIT UNTIL MARK
OFFPOS=-REG_POS 'On-the-fly
position adjust
On the label feeder, the registration mark printed on the label is used to check the feed and correct for any errors. In this type of application, the registration control works by measuring any error on the current move and applying a correction to the next. The controller must have the ability to capture the label registration event and synchronize the label feed to the conveyor encoder for precise operation.
As the line speed increases, command execution lag time can become an issue. However, interpolating a position between servo periods can compensate the lag time. The move can then begin at the exact required origin within one encoder count (Figure 8). This technique ensures the label move will be as accurate as possible, even at high speeds.
BASE(label_feed)
Loop:
Label_pos=127
REGIST(3) 'Set to look for
REG input (Label Reg mark)
MOVELINK(lab_pitch+radj,
linkdst,20,20,conveyor,2,
label_pos)
WAIT UNTIL MARK OR MTYPE=0
'Wait for MARK or MOVELINK
is finished 'Reg mark seen,
calculate error
reg_err=expected-REG_POS
radj=reg_err*0.4 'Adjust by
reg. 'gain'
.
.
GOTO loop
There are many different ways to synchronize motion-from electronic gearing with phase shifting to multiaxis interpolated motion to registration capture and command generation. Understanding how a motion controller handles all types of synchronizing can save you time and prevent possible applications problems in the long run when throughput speeds increase. MC
Make Contact!
Ed Novak is the sales manager for Trio Motion Technology, LLC. Contact him at 1,000 Gamma Drive, Suite 206, Pittsburgh, PA 15238; tel: (412) 968-9744; fax: (412) 968-9746; www.triomotion.com.
Return to Previous Page
Read questions answered by our experts or join the email list.

