Beckhoff TwinSAFE logic FB Documentation page 152

Twincat function blocks for twinsafe logic components
Table of Contents

Advertisement

Function blocks
3.22.2.1 Diagnostic and state information for the FB Counter
Table 3-138: Diagnostic information
Value
Description
0
No diagnostic information
1
The ActValue output has an underflow (is less than the smallest possible value)
2
The ActValue output has an overflow (is greater than the largest possible value)
Table 3-139: Diag Message
Text ID
Meaning
0x40B8
An underflow has occurred
0x40B9
An overflow has occurred
Table 3-140: State information
Value
Description
1
RUN
In the RUN state the FB COUNT module sets the ActValue output to PresetValue if the
Reset input is TRUE.
If the Reset input is FALSE, the FB COUNT module increments the ActValue output when a
rising edge is detected at the CountUp input and decrements it when a rising edge is
detected at the CountDown input (this means ActValue remains unchanged when both
CountUp and CountDown inputs detect a rising edge).
The outputs assume the following values:
Error=0
CounterOut=(ActValue >= CounterLimit)
CounterZero=(ActValue == 0)
Reset=TRUE: ActValue=PresetValue
Reset=FALSE: ActValue=ActValue+n (-1 <= n <= 1)
2
STOP
The FB COUNT module assumes the STOP state if the input FbRun is FALSE.
The outputs assume the following values:
Error=0
CounterOut=0
CounterZero=0
ActValue=0
4
ERROR
If the FB COUNT module detects an error while checking the value range of CounterOut,
the FB COUNT module switches to the ERROR state and transmits the corresponding Diag
message to the GROUP module.
The outputs assume the following values:
Error=1
CounterOut=0
CounterZero=0
ActValue=0
5
RESET
The FB COUNT module assumes the RESET state if no further error is pending after an
error has occurred and the ErrAck input of the corresponding group is set to TRUE.
The outputs assume the following values:
Error=0
CounterOut=0
CounterZero=0
ActValue=0
150
Parameter 1
Parameter 2
FB number
ActValue
FB number
ActValue
Function blocks for TwinSAFE logic components
Parameter 3
Smallest permitted value
Largest permitted value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents

Save PDF