Incremental Encoder

The function block CMS_IO_32BIT_ENCODER can be used to control an encoder device for relative positioning with 3 signals CMS_IO_32BIT_ENCODER: CMS_IO_32BIT_ENCODER

The rotation is identified with a shift angle (90°) between A and B signal. In the Function Module, the clockwise rotation is identified with A signal in advance to B.

Possible operation modes: 11-1, 12-1, 13-1 <no title>

../_images/19807b49e38b6bd20a33139000eba54e1

Clockwise rotation in the Function Module: A signal ahead from B signal

../_images/6749f714e38b6c200a33139000eba54e1

Counter-clockwise rotation in the Function Module: A signal late from B signal

Depending on choosen operation mode, the counting procedure will be x1, x2 or x4 count. Basically the x1 counting mode is used (operation mode 11-1). The encoder module discriminates the rotating way and count one pulse for each rising edge of the A signal.

With clockwise rotation, function block CMS_II_32BIT_ENCODER counts downwards. With counter-clockwise rotation, function block counts upwards.

In order to increase resolution, the x2 counting mode can be specified (operation mode 12-1). The encoder module counts one pulse on each rising and falling edge of A signal.

The resolution could be multiplied by 4, using the x4 counting mode (operation mode 13-1). The encoder module counts a pulse on both rising and falling edge of A signal and B signal.

Touch/Catch Operation

The touch/catch operation is the way to acquire the counting position synchronously with hardware external signal removing all the latency time of I/O-Bus and network. This operation allows synchronization between 2 different encoder devices if the same hardware signal is used for touch/catch input.

On edge of the physical external signal, the current counter value (ACT) is stored in a dedicated double word (CNT_TOUCH). The touch/catch operation could be settled on rising or falling edge depending on parameter EDGE_TOUCH.

../_images/dbe64d18e38b6e130a33139000eba54e1

Procedure and associated counting value with signal A

Touch/catch operation is enabled through control bit (EN_TOUCH). This resets the status flag (RDY_TOUCH), when the pre-determined edge occurs; the current counter value is stored in the touch value double word. In the same time, the status RDY_TOUCH is set to TRUE.

A rising edge at input DI0, DI1, DC2 or DC3 causes the function block to store the actual counter value and to display this value at output CNT_TOUCH.

RPI Procedure

The RPI (Reference Point Initialization) is used to synchronize the counter value with the mechanical zero reference based on signal Z.

RPI procedure is enabled with control bit (EN_RPI). If this control bit is set, the module checks for the Z signal. When the signal appears, the set value is copied in the current counter value and RDY_RPI is set (see figure below).

../_images/95dd833be38b6e710a33139000eba54e1

RPI operation

A rising edge at the digital inputs DI0, DI1, DC2 or DC3 activates the counter value capture and the counter reset during the capture.

Only one function may be enabled at one time, either the RPI (reference point indicator) or TOUCH (touch trigger measurement) function. If both functions are enabled simultaneously or if the execution of one function is not yet completed when enabling the other function, the RPI function will have a higher priority than the TOUCH function.

SET Operation

A rising edge at input DI0, DI1, DC2 or DC3 causes the function block to store the START_VALUE value and to display this value at output ACT.

RESET Operation

A rising edge at input DI0, DI1, DC2 or DC3 causes the block to reset the value at output ACT.

Overflow Operation

The counter operates as infinite counter. An overflow occurs corresponding to the 32 bit value at 16#80000000 = 2147483648 and any exceeding or falling below of this value (depending to up and down use) OFL will set to TRUE.

../_images/203b22abe38b70a30a33139000eba54e1