Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages


Figure 10 - Examples of function block declarations


Download 1.35 Mb.
Pdf ko'rish
bet64/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   60   61   62   63   64   65   66   67   ...   158
Bog'liq
ourdev 569653

Figure 10 - Examples of function block declarations
IEC 2480/02
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)
– 71 –
Table 33 - Function block declaration and usage features
No.
Description
Example
1a
RETAIN qualifier on internal variables
VAR RETAIN X : REAL ; END_VAR
1b
NON_RETAIN qualifier on internal
variables
VAR NON_RETAIN X : REAL ; END_VAR
2a
RETAIN qualifier on output variables
VAR_OUTPUT RETAIN X : REAL ; END_VAR
2b
RETAIN qualifier on input variables
VAR_INPUT RETAIN X : REAL ; END_VAR
2c
RETAIN qualifier on output variables
VAR_OUTPUT NON_RETAIN X : REAL ; END_VAR
2d
RETAIN qualifier on input variables
VAR_INPUT NON_RETAIN X : REAL ; END_VAR
3a
RETAIN qualifier on internal function blocks
VAR RETAIN TMR1: TON ; END_VAR
3b
NON_RETAIN qualifier on internal function blocks
VAR NON_RETAIN TMR1: TON ; END_VAR
4a
VAR_IN_OUT declaration (textual)
VAR_IN_OUT A: INT ; END_VAR
4b
VAR_IN_OUT declaration and usage(graphical)
See figure 12
4c
VAR_IN_OUT declaration with assignment to different variables (graphical)
See figure 12d
5a
Function block instance name as input
(textual)
VAR_INPUT I_TMR: TON ; END_VAR
EXPIRED := I_TMR.Q; (* Note 1 *)
5b
Function block instance name as input (graphical)
See figure 11a
6a
Function block instance name as
VAR_IN_OUT (textual)
VAR_IN_OUT IO_TMR: TOF ; END_VAR
IO_TMR(IN:=A_VAR, PT:=T#10S);
EXPIRED := IO_TMR.Q; (* Note 1 *)

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   60   61   62   63   64   65   66   67   ...   158




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling