Encoder
ENC Indexed Cyclic Position
Description

This function block is used to both calibrate the index positions of cyclic position application and to select the Desired Position in the cycle when moving between index positions. The calibration portion arithmetically calculates the Index Length from the Cycle Length of the associated ENC Reference Position function block.

From this Index Length, the position selection portion uses the Index value to calculate a Desired Position. The Desired Position value (with the appropriate offset) is then compared to the Current Position generating a Position Error output. The output may then be used for control purposes.

A Position Error value of 0.00% indicates you are in the Desired Position.

cyclic_index

In the illustration above, there are 18 positions in the cycle and in this case the Desired Position is Position 5. The magenta path above represents the 64-bit count associated with the Desired Position and is calculated as follows:

Desired Position = ( ( 5 * ( Cycle Length / 18 ) ) + Reference Position )

If the ENC Reference Position is associated with an ENC Position Point, the Reference Position is a 64-bit value determined by the Position Point's offset from the Cycle Zero position. If the ENC Reference Position is directly associated with an ENC# Cyclic Position function block, the Reference Position is also the Cycle Zero.

The Position Error would is calculated as follows:

Position Error % = ( Desired Position - Current Position ) * 100

Design Note:

If the ENC Reference Position is associated with an ENC Position Point function block (in lieu of directly referencing an ENC# Cyclic Position function block), the Index Origin may be easily moved without changing the Cycle Length and indirectly the Index Length. This scheme allows the photo-eye or proximity switch being used as the calibration input to be relocated without having to recommission the entire system. Only the associated ENC Position Point function block needs to be re-calibrated after movement of the input sensor.

Availability
  • Available only in the dw2xx series products
  • Requires library: Encoder Control (option -11)
  • Requires: Single or Dual Encoder
  • Firmware versions 0x2016 and later
savvy-SFD Graphic encCycPosIndexed
Graphic with Parameters encCycPosIndexed

Parameters

ENC Reference Position Internal Parameter, Read-write, Function Block Association (signed 16-bit integer)

This function block may be associated with the following position control function blocks:

  • ENC# Cyclic Position
    When selected, the Reference Position offset is zero.

  • ENC Position Point
    When selected, the Reference Position is the 64-bit value stored by the Position Point function block, which in turn, is referenced to the Cycle Zero position.

In either case, the Cycle Length is obtained either directly from the ENC# Cyclic Position function block or inherited via the ENC Position Point function block.


Indices / Cycle Input, Read-write, Analog (unsigned 16-bit integer)
1 to 65535

In most applications, this parameter is the total number of stop points in the cycle and is used to calculate the Index Length.

Generally, the distance between stop points is a constant value; however, if all of the stop points are exact multiples of some minimum Index Length, this parameter would be set to the total number of minimum Index Length's required to select the appropriate stop position.


Index Input, Read-write, Analog (unsigned 16-bit integer)
0 to 65535

This parameter sets the multiplier for the Desired Position calculation. If the setting exceeds the Indices / Cycle, the resulting move will be the number of complete cycles as determined by the quotient of the Index ÷ Indices / Cycle with the final position Index determined by the remainder.

For example, if the Indices / Cycle is 18 and the Index is set to 25, the move would be one complete cycle with the final location of Position 7.


Position Error Output, Read-only, Analog (signed 16-bit integer)
-327.67 % to 327.67 %

The Position Error is generated by comparing the Desired Position to the Current Position as follows:

Position Error % = ( Desired Position - Current Position ) * 100

If the Position Error exceeds +/- 327.66%, the parameter will indicate overrange; however, the 64-bit Internal Count is unaffected.


-32767 = - overrange
32767 = + overrange