Table 35 - Standard edge detection function blocks
No.
Graphical form
Definition
(ST language - see 3.3)
1
Rising edge detector
+--------+
| R_TRIG |
BOOL---|CLK Q|---BOOL
+--------+
FUNCTION_BLOCK R_TRIG
VAR_INPUT CLK: BOOL; END_VAR
VAR_OUTPUT Q: BOOL; END_VAR
VAR M: BOOL; END_VAR
Q := CLK AND NOT M;
M := CLK;
END_FUNCTION_BLOCK
2
Falling edge detector
+--------+
| F_TRIG |
BOOL---|CLK Q|---BOOL
+--------+
FUNCTION_BLOCK F_TRIG
VAR_INPUT CLK: BOOL; END_VAR
VAR_OUTPUT Q: BOOL; END_VAR
VAR M: BOOL; END_VAR
Q := NOT CLK AND NOT M;
M := NOT CLK;
END_FUNCTION_BLOCK
NOTE When the CLK input of an instance of the R_TRIG type is connected to a value of
BOOL#1, its Q output will stand at BOOL#1 after its first execution following a “cold restart”
as described in 2.4.2. The Q output will stand at BOOL#0 following all subsequent
executions. The same applies to an F_TRIG instance whose CLK input is disconnected
or is connected to a value of FALSE.
2.5.2.3.3 Counters
The graphic representations of standard counter function blocks, with the types of the associated
inputs and outputs, shall be as shown in table 36. The operation of these function blocks shall be as
specified in the corresponding function block bodies.
Copyright International Electrotechnical Commission
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---
61131-3
IEC:2003(E)
– 79 –
Table 36 - Standard counter function blocks
No.
Graphical form
Function block body
Do'stlaringiz bilan baham: |