Encoder Wrap Maximum

Type:

Axis Parameter Register

Address:

RMC75: n/a

RMC150: n/a

RMC200: %MDn.64, where n = 384 + the axis number

System Tag:

_Axis[n].EncoderWrapMax, where n is the axis number

How to Find:

Axis Parameters Pane ® All tab ® Feedback

Data Type:

DINT

Range:

All

Default:

2147483647

Description

The Encoder Wrap Maximum works together with the Encoder Wrap Minimum axis parameter to reflect the data range of the data value that is received from an EtherCAT rotary encoder. This parameter only applies to position axes.

When the feedback from an encoder wraps around the zero counts point, it is important that the axis is configured to expect the wrapping. By setting the Encoder Wrap Maximum and Minimum axis parameters correctly, the axis will interpret the feedback data correctly when wraps occur.

Setting these values is usually not necessary in the following situations:

*Most CiA402 drives provide a signed 32-bit integer range, which works correctly with the default Encoder Wrap Maximum and Minimum values. However, the CiA402 specification does allow for a smaller range, in which case the Encoder Wrap Maximum and Minimum values must be set for that range. However, very few drives support this smaller range (Copley is one example) and typically, the user must specifically choose the smaller range, which is unusual.

Setting these values is important in the following situations:

Setting the Max and Min Encoder Wrap parameters for a rotary encoder:

Single-turn Encoder (not from a drive) on a rotary axis with the Count Unwind equal to the resolution:

  1. Consult the encoder manufacturer’s documentation to determine the number of bits per turn that the encoder provides.

  2. Set the Min Encoder Wrap to the lowest value of the range, which is typically zero.

  3. Set the Max Encoder Wrap to the highest value of the range, which is typically the number of counts per turn minus 1.

Multi-turn Encoder (not from a drive) on a rotary axis:

  1. Consult the encoder manufacturer’s documentation to determine the range of bits that the encoder provides.

  2. Set the Min Encoder Wrap to the lowest value of the range, which is typically zero.

  3. Set the Max Encoder Wrap to the highest value of the range, which is typically the full range of counts minus 1.

  4. Determine the number of Counts per machine cycle and set the Count Unwind to the value. For absolute mode, the encoder range must be a whole number multiple of the Count Unwind.

Multi-turn Encoder (not from a drive) on a linear axis, with no intended wrapping, but the zero point occurs in the travel:

  1. Consult the encoder manufacturer’s documentation to determine the range of bits per that the encoder provides.

  2. Set the Min Encoder Wrap to the lowest value of the range, which is typically zero.

  3. Set the Max Encoder Wrap to the highest value of the range, which is typically the full range of counts minus 1. For correct operation, the encoder range must be a whole number multiple of the Count Unwind.

Note: For this situation, the Max and Min Wrap parameters must be set solely to set the Counts Offset to move the zero point of the encoder out of the range of expected travel. However, encoders often support other methods to move the zero point away from the range of expected travel (consult the encoder documentation for details). Doing so means that it is unnecessary to use the Count Offset and unnecessary to set the Max and Min Encoder Wrap parameters.

Encoder from a drive:

For an EtherCAT encoder that is from a drive, leave the Max and Min Encoder Wrap parameters at their default values of 2147483647 and -2147483648, respectively. The only exception is the rare case where the range in the drive has been set to be smaller, in which case, set the Max and Min Encoder Wrap parameters to the same range.

Rotary Axis Relationship between Encoder Wrap Min and Max parameters and the Count Unwind

For an absolute rotary axis to operate correctly continuously, it is important that the encoder’s full range is a whole number multiple of the Count Unwind value . A common situation is a multi-turn rotary encoder where the Count Unwind may be some value that corresponds to the number of counts for one machine rotation, which is much less than the maximum encoder counts. As the Counts go through many machine rotations, the value always starts over after reaching the Count Unwind, while the Raw Counts from the encoder will eventually reach the upper range of the encoder. It is important that as the full range of the encoder is exceeded and the encoder Raw Counts starts over at zero, that point coincides exactly with the wrapping of the Counts based on the Count Unwind, otherwise the position within a machine cycle will not correctly be known.

If the axis drive train includes gearing, the gearing ratio and encoder counts per machine cycle result in a certain Count Unwind. It is important that this yields a Raw Counts range that is a whole number multiple of the Count Unwind.

Example:

Consider a machine with a 24-bit absolute encoder where 12 bits are dedicated to the resolution for a given turn (4096 counts per turn), and the other 12 bits count the number of turns (4096 turns). The total number of counts for this encoder is 224 = 16,777,216. That means the Raw Counts will go from zero to 16,777,215, then start over at zero.

If the machine cycle is 4 encoder revolutions, and if it is important to correctly know the position within each machine cycle, but not necessarily important to know how many cycles have been completed since the machine started, then the user would set the Count Unwind to 4,096 x 4 = 16,384. Each cycle of the machine, the Counts will go from 0 to 16,383, then start over at zero for the next machine cycle.

As the machine completes 1024 cycles, the encoder will wrap 4096 times and the Raw Counts from the encoder will reach 16,777,215, then wrap to zero. Because the Encoder range of 16,777,216 is a whole number multiple of the Count Unwind (16,384), the Counts will wrap at the same place as the Raw Counts, and the position feedback will continue to correctly report the position of the machine within each machine cycle.

 

For details on configuring encoder feedback, see the Rotary Scaling topic. See the Axis Type: Rotary and Linear page for details on using rotary feedback for a linear axis.

 

See Also

EtherCAT Overview | Using Rotary Motion | Axis Type: Rotary and Linear | Rotary Scaling


Send comments on this topic.

Copyright © 2025 Delta Computer Systems, Inc. dba Delta Motion