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


Figure 6 - Examples of function declarations and usage


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

Figure 6 - Examples of function declarations and usage
IEC 2476/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)
– 53 –
2.5.1.4 Typing, overloading, and type conversion
A standard function, function block type, operator, or instruction is said to be overloaded when it can
operate on input data elements of various types within a generic type designator as defined in 2.3.2.
For instance, an overloaded addition function on generic type ANY_NUM can operate on data of types
LREAL, REAL, DINT, INT, and SINT.
When a programmable controller system supports an overloaded standard function, function block
type, operator, or instruction, this standard function, function block type, operator, or instruction shall
apply to all data types of the given generic type which are supported by that system. For example, if a
programmable controller system supports the overloaded function ADD and the data types SINT, INT,
and REAL, then the system shall support the ADD function on inputs of type SINT, INT, and REAL.
When a function which normally represents an overloaded operator is to be typed, i.e., the types of its
inputs and outputs restricted to a particular elementary or derived data type as defined in 2.3, this shall
be done by appending an “underline” character followed by the required type, as shown in table 21.
Table 21 - Typed and overloaded functions
No.
Feature
Example
1
Overloaded functions
+-----+
| ADD |
ANY_NUM-----| |----ANY_NUM
ANY_NUM-----| |
. -----| |
. -----| |
ANY_NUM-----| |
+-----+

Download 1.35 Mb.

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




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