Two 16 Bit Up/Down CountersΒΆ

The function block CMS_IO_16BIT_2CNT can be used to control two independent 16 bit up/down counter functionsCMS_IO_16BIT_2CNT: CMS_IO_16BIT_2CNT CMS_IO_16BIT_2CNT  2 x 16 Bit Counters. A signal, used for pulse count, is identified by A+ and B+.

Possible operation modes: 3-2, 4-2 <no title>

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/dbe64d18e38b6e130a33139000eba54e2

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.

RESET Operation

A rising edge at input DI0, DI1, DC2 or DC3 which is configured as RESET causes the function block to reset the value at output ACT1. A rising edge at input DI0, DI1, DC2 or DC3 which is configured as Reset 2nd Bit counter causes the function block to reset the value at output ACT2.

Overflow Operation

The counter operates as an infinite counter. It is set to TRUE, when an overflow occurs, i.e. the counter value ACT1 or ACT2 goes up to value 16#FFFF= -1. Any exceeding or falling below of this value (depending to up use and down use) will set OFL1 = TRUE or OFL2 = TRUE.