Servo Configuration
Recommended Settings
The recommended settings are based on the following principles:
Drive position units should be application relevant (positions should be expressed relative to the output of any gearing/staging rather than internal motor revolutions)
Drive position units should be dimensionally appropriate (radians for rotary axes, meters for linear axes)
Drive position units should be fine enough to achieve high application precision
System stability should be maintained by avoiding data conversion errors (overflow) for typical applications
MotionPlus Settings
The recommended MotionPlus parameter settings for ethercat_config_axis()
are as follows:
Parameter |
Value |
Rational |
---|---|---|
|
1000000 |
Precise control (e.g. 1e-6 radians for a rotary positioner, 1 µm for a linear rail) |
|
1 |
The unit dimension should be set within the EtherCAT Drive |
|
1 |
Gearing should be set within the EtherCAT Drive |
|
0 |
The EtherCAT Drive should be homed to an application-relevant position |
EtherCAT Servo Drive Settings
The EtherCAT CoE standard notes the following CiA402 Objects relevant to control of the internal position mapping. Parameter naming and standard adherence varies by make and model. Consult drive manufacturer documentation for specific details on how to set these values with their software.
Only set your Gear Ratio and Feed Constant in one place - either the MotionPlus settings or the EtherCAT servo drive settings. As indicated in the MotionPlus settings above, we recommend setting them in the EtherCAT drive.
Object |
Index |
Description |
---|---|---|
|
|
The numerator and denominator for |
|
|
The numerator and denominator for |
|
|
The numerator and denominator for |
|
|
Typically set to |
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 |
---|---|---|
|
4194304 |
|
|
2*pi |
|
|
120.46 |
|
|
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:
The MotionPlus URCap receives the Axis Target Position from URControl
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, ...)
The scaled and offset value is converted to EtherCAT INTEGER32 format and checked for positive and negative overflow.
The INTEGER32 value is sent via EtherCAT CoE PDO to the EtherCAT CoE Object:
Position Demand Value
(0x6062)The EtherCAT drive performs internal operations to map the commanded position to a servo control target
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.