The TSX CTY2A and 4A module operation for combined up / down counting is introduced below.
Counting or down counting are the changes of the same register of the module. The only difference is the direction of the change. This is defined by software configuration, by a physical input or by the application of the count signal to a specific input.
The counting register changes are possible only when the function is enabled:
-
by a physical input IVal ST IVAL (%IWr.m.c.2.2) with software pre-positioning (enable command ENAB_IENAB (%Qr.m.c.5)),
-
directly, using the software: direct enable command DIR_ENAB (%Qr.m.c.0).
The count values vary between:
-
-16,777,216 and +16,777,215 (24 bits + sign).
The following timing diagram shows the up/down counting process, when the count signal is applied to the
IA input ST_IA (%IWr.m.c.2.0), the
IB input ST_IB (%IWr.m.c.2.1) defines the counting direction. There are many other possibilities (previously introduced) to define the counting direction, but the up/down counting principle is the same. The associated language objects are described in the
implicit objects part.