Servo Configuration

Overflow Errors - Drive Motor Encoder Counts

If the MotionPlus and EtherCAT Drive parameters are set such that communication of position via EtherCAT takes place in units of Drive Motor Encoder counts, there is a danger of experiencing reduced operating range at the application level due to data conversion overflow.

For an example welding application with a high resolution encoder and large gear ratio between the drive motor and positioner output shaft, with the MotionPlus parameters set to units of drive motor encoder counts:

Parameter

Value

Notes

counts_per_rev

4194304

[encoder counts] / [motor revolutions]

feed_constant

2*pi

[radians] / [output shaft revolutions]

gear_ratio

120.46

[motor revolutions] / [output shaft revolutions]

zero_offset_count

0

The positioner would trigger an overflow error if moved greater than ~4.25 revolutions from the 0 position in either direction.

  • INTEGER32_[MIN, MAX]: [-2147483648, 2147483647]

  • INTEGER32_[MIN, MAX] / (counts_per_rev * gear_ratio) = ~4.250374 revolutions

Position Mapping Explained

Universal Robots motion control represents the Target Position for external axes in units of either radians (for rotary axes) or meters (for linear axes), accessible as a 64-bit double-precision floating-point value. During operation, the Axis Target Position is mapped to the 32-bit EtherCAT CoE Object: Position Demand Value of the EtherCAT Drive. This mapping is controlled by several parameters in the MotionPlus URCap, along with parameters set within the EtherCAT drive itself.

Converting Axis Target Position to EtherCAT Drive Position Demand Value (0x6062)

To help understand how to set the EtherCAT Drive position mapping parameters appropriately, an overview of the mapping process is provided. The order of operations is as follows:

  1. The MotionPlus URCap receives the Axis Target Position from URControl

  2. The Axis Target Position is scaled and offset according to several of the parameters provided by ethercat_config_axis(..., counts_per_rev, gear_ratio, feed_constant, zero_offset_count, ...)

  3. The scaled and offset value is converted to EtherCAT INTEGER32 format and checked for positive and negative overflow.

  4. The INTEGER32 value is sent via EtherCAT CoE PDO to the EtherCAT CoE Object:Position Demand Value (0x6062)

  5. The EtherCAT drive performs internal operations to map the commanded position to a servo control target

  6. The EtherCAT drive moves to the commanded position

The diagram below shows how the target position in URControl is converted into the position demand value for the servo.