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


Download 1.35 Mb.
Pdf ko'rish
bet48/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   44   45   46   47   48   49   50   51   ...   158
Bog'liq
ourdev 569653

2
 a
Typed functions
+---------+
| ADD_INT |
INT-----| |----INT
INT-----| |
. -----| |
. -----| |
INT-----| |
+---------+
NOTE The overloading of non-standard functions or function block types is beyond the scope of
this standard.
a
If feature 2 is supported, the manufacturer shall provide a table of which functions are
overloaded and which are typed in the implementation.
When the type of the result of a standard function defined in 2.5.1.5 is generic, then the actual types of
all input variables of the same generic type shall be of the same type as the actual type of the function
value in a given invocation of the function. If necessary, the type conversion functions defined in
2.5.1.5.1 can be used to meet this requirement. Examples of the application of this rule are given in
figures 7 and 8.
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 54 –
61131-3 
 IEC:2003(E)
Type declaration
(ST language - see 3.3)
Usage
(FBD language - see 4.3)
(ST language - see 3.3)
VAR
A : INT ;
B : INT ;
C : INT ;
END_VAR
+---+
A---| + |---C
B---| |
+---+
C := A+B;
NOTE Type conversion is not required in the example shown above.
VAR
A : INT ;
B : REAL ;
C : REAL;
END_VAR
+-----------+ +---+
A---|INT_TO_REAL|---| + |---C
+-----------+ | |
B-------------------| |
+---+
C := INT_TO_REAL(A)+B;
VAR
A : INT ;
B : INT ;
C : REAL;
END_VAR
+---+ +-----------+
A----| + |---|INT_TO_REAL|---C
B----| | +-----------+
+---+
C := INT_TO_REAL(A+B);

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   44   45   46   47   48   49   50   51   ...   158




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