5 data transfer, function – BECKHOFF KL1501 User Manual
Page 16

Terminal configuration
14
KL1501
3.5 Data transfer, function
3.5.1 Automatic setting of the outputs with defined
counter readings
V/R counter or gated
counter:
An internal function for setting the outputs can activated via the feature
register R32.
If the counter reaches the counter status 0x80000000 the output OUT1 is
set (feature bit 5) or is reset (feature bit 6).
If the counter overflows, the output is withdrawn accordingly.
In parallel, output OUT2 is set with bit 15 (0x8000).
Two counters active:
If the corresponding counter reaches the counter status 0x8000 the output
(OUT2, OUT1) is set (feature bit 4,6) or is reset (feature bit 5,7).
If the counter overflows, the output is withdrawn accordingly.
Example
Feature register = 0x02AC, i.e. two counters are active, the counter is set
via the positive edge of the CNT_SET bits and the control bit CNT_INH is
responsible for setting the second counter.
A glass is to be filled with 200 ml of beer. In doing so, one pulse
corresponds to 0.01 ml, i.e. one glass corresponds to 20000 pulses
(0x31E0 = 0x8000-20000).
First counter
Control
byte
Status
byte
Output
data
Output
OUT1
Function
0x0000
0x00
0x00
0x0000
Low
Power on reset
0x0000
0x22
0x00
0x31E0
Low
Counter is set, internal
function activated
0x31Ex
0x02
0x28
Don’t care
High
Beer is running
....
0x8000
0x02
0x00
Don’t care
Low
The first glass is full
...
0x8000
0x22
0x00
0x31E0
Low
Counter is set, internal
function activated
0x31Ex
0x02
0x28
Don’t care
High
Beer is running
....
0x8000
0x02
0x00
Don’t care
Low
The second glass is full
....