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


Download 1.35 Mb.
Pdf ko'rish
bet91/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   87   88   89   90   91   92   93   94   ...   158
Bog'liq
ourdev 569653

2.7 Configuration elements
As described in 1.4.1, a configuration consists of resources, tasks (which are defined within
resources
), global variables, access paths and instance specific initializations. Each of these
elements is defined in detail in this subclause.
A graphic example of a simple configuration is shown in figure 19 a). Skeleton declarations for the
corresponding function blocks and programs are given in figure 19 b). This figure serves as a
reference point for the examples of configuration elements given in the remainder of this subclause
such as in figure 20.
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)
– 109 –
CONFIGURATION CELL_1
RESOURCE STATION_1
F
G
B
RESOURCE STATION_2
C
D
GLOBAL AND DIRECTLY REPRESENTED VARIABLES
AND INSTANCE-SPECIFIC INITIALIZATIONS
ACCESS PATHS
TASK
SLOW_1
P1
P2
P1
P4
x1
y1
y2
FB2
FB1
FB2
z1
x2
FAST_1
SLOW_1
BAKER
ABLE
CHARLIE
DOG
GAMMA
ALPHA
BETA
x1
x2
PER_2
F
H
HOUT1
INT_2
b1
b2
d1
Communication function
(See IEC 1131-5)
PER_2
COUNT
S1_COUNT
THETA
C2
C3
TASK
FAST_1
TASK
PER_2
TASK
INT_2
%IX1.1
A y1
FB1
y2
SLOW_1
out1
w
z2
%QW5
ZETA
%QB25
c1
OMEGA
Figure 19 a) - Graphical example of a configuration
IEC 2493/02
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 110 –
61131-3 
 IEC:2003(E)
FUNCTION_BLOCK A
VAR_OUTPUT
y1 : UINT ; y2 : BYTE ;
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK B
VAR_INPUT
b1 : UINT ; b2 : BYTE ;
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK C
VAR_OUTPUT c1 : BOOL ; END_VAR
VAR C2 AT %Q*: BYTE;
C3: INT;
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK D
VAR_INPUT d1 : BOOL ; END_VAR
VAR_OUTPUT y2 : INT ; END_VAR
END_FUNCTION_BLOCK
PROGRAM F
VAR_INPUT x1 : BOOL ; x2 : UINT ; END_VAR
VAR_OUTPUT y1 : BYTE ; END_VAR
VAR COUNT: INT; TIME1: TON; END_VAR
END_PROGRAM
PROGRAM G
VAR_OUTPUT out1 : UINT ; END_VAR
VAR_EXTERNAL z1 : BYTE ; END_VAR
VAR FB1 : A ; FB2 : B ; END_VAR
FB1(...); out1 := FB1.y1; z1 := FB1.y2;
FB2(b1 := FB1.y1, b2 := FB1.y2) ;
END_PROGRAM
PROGRAM H
VAR_OUTPUT HOUT1: INT ; END_VAR
VAR FB1 : C ; FB2 : D ; END_VAR
FB1(...) ;
FB2(...); HOUT1 := FB2.y2;
END_PROGRAM

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   87   88   89   90   91   92   93   94   ...   158




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