X20 system modules • Counter modules • X20DC2395
814
X20 system User's Manual 3.10
4.11.14.12.6.2 Sample configurations
All of the settings available in Automation Studio for AB encoders, ABR encoders, up/down counters and event
counters are based on the two counter functions.
The following configuration examples show the values with which Automation Studio initializes the module registers
in order to implement these functions.
I/O configuration - AB encoder
The following table shows how the module's various event functions can be linked in order to configure an AB
encoder.
[x] stands for the respective counter function, either 1 or 2
Register
Value
Comment
For the function
0x01
Mode = Up/down counter
0x0D
Configure the calculation of the internal "counter1" and "counter2" registers
(see 4.11.14.12.6.1 "Counter value calculation" and "Examples of calculation
For the latch
0x000D
Configuration of the calculation of the first value used for the latch
0x03
Mode of the first counter event function - Continuous
(any)
Number of the event that should trigger Latch 1 ("Latch 01 - Channel" in the AS
I/O configuration).
0x0D
Configuration of the calculation of the second value used for the latch
0x03
Mode of the second counter event function - Continuous
(any)
Number of the event that should trigger Latch 2
For the comparator
0x00D0
Event number of Timer 1 (50 μs)
Information:
The latch and comparator must not have the same event number!
0x900D or 0xA00D
Configuration of the comparator for the second counter event
0x03
Mode of the second counter event function - Continuous
0x0861
TRUE event output of the second counter to trigger the direct output function
(set outputs).
0x08, 0x20, 0x80
Outputs that should be set when comparator condition = TRUE
0x0860
FALSE event output of the second counter to trigger the direct output function
(reset outputs).
0x08, 0x20, 0x80
Outputs that should be reset when comparator condition = FALSE