Continuous Turn Axes (Rollover Compensation)

Some independently controlled rotary axes and some robot axes have the ability to rotate continuously without encountering a limit stop. For example, a motor that powers a conveyor belt can turn indefinitely as it drives the belt. Also, some final tool axes of robots, which are not encumbered by cables, can turn continuously and never have to be unwound. The difficulty with controlling such axes is that periodically the hardware counter that represents the position of the axes’ motor will rollover. That is, the encoder counter will spontaneously change from one maximum integer value to the maximum integer value of the opposite sense. This can cause problems in computing positions and changes in position. Furthermore, since an encoder counter will rollover at a power of 2 and many motors do not generate an even power of 2 encoder counts per revolution, encoder counter rollover will often occur at different motor angles.

To handle continuously turning axes, the system includes “encoder rollover compensation”. When this compensation is enabled for an axis, the problem of compensating for hardware rollover is automatically handled and hidden from the programmer. Instead, the abstracted “joint position” of the axis, in units of degrees, predictably rolls over at specified physical angles. For example, the system can be configured to automatically roll back (subtract) 360 degrees from the position of a joint each time the joint completes a motion and its final position is greater than 360 digress (the “rollover position”).

The following two Parameter Database values are used for configuring encoder rollover compensation. For more detailed information on these parameters please see the Reference Document section.

Parameter Database ID Parameter Name Description

2302

Joint roll over value in deg

To enable encoder rollover compensation for a joint, the rollover position for the joint must be set to a positive, non-zero number. If the joint is not designed to operate in rollover mode, a configuration error will be signaled. Otherwise, rollover compensation will start immediately.  Please see the detailed descriptions on the Kinematic Modules for information on which modules support this capability.  Typically, the rollover count is set to 360.

2303

Unidirectional roll over

This parameter defines whether the axis is only permitted to move in a positive or negative direction. Normally, joints are configured for bi-directional travel, which is the default. If unidirectional travel is asserted, all commanded joint positions for the rollover joint are forced to be in the permitted direction of travel and changes in joint position are limited to at most one joint rollover per motion segment.

Rollover values are defined in joint coordinate units, typically degrees. Rollover values are normally set to be an even multiple of rotations, e.g. 360 deg, 720 deg, etc. Internally, the encoder counters are implemented as 32 bit counters. Therefore, encoder counters separately roll over every 4,294,967,296 counts. Joint rollover values when converted to encoder counts should always be less than half of the encoder rollover value. This is rarely a problem since a typical roll over value will be 360 deg times 2048 encoder counts per degree or 737,280 encoder counts.

The motion control system tests for a rollover condition at the following times;

Whenever a test detects that the absolute value of the joint position has exceeded the rollover value, the current joint position is decreased or increased by an even multiple of rollover values to bring it as close to zero as possible. Simultaneously with the adjustment of the joint value, an internal encoder offset is computed such that the actual motor position command is unchanged.