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


Download 1.35 Mb.
Pdf ko'rish
bet53/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   49   50   51   52   53   54   55   56   ...   158
Bog'liq
ourdev 569653

2.5.1.5.3 Bit string functions
The standard graphical representation, function names and descriptions of shift functions for a single
bit-string variable shall be as defined in table 25. These functions shall be overloaded on all bit-string
types, and can be typed as defined in 2.5.1.4.
The standard graphical representation, function names and symbols, and descriptions of bitwise
Boolean functions shall be as defined in table 26. These functions shall be extensible, except for NOT,
and overloaded on all bit-string types, and can be typed as defined in 2.5.1.4.
Table 25 - Standard bit shift functions
Graphical form
Usage example
 a
+-----+
| *** |
ANY_BIT ---|IN |--- ANY_BIT
ANY_INT ---|N |
+-----+
(***) - Function Name
A := SHL(IN:=B, N:=5) ;
(ST language - see 3.3)
No.
Name
Description
1
SHL
OUT := IN left-shifted by N bits, zero-filled on right
2
SHR
OUT := IN right-shifted by N bits, zero-filled on left
3
ROR
OUT := IN right-rotated by N bits, circular
4
ROL
OUT := IN left-rotated by N bits, circular
NOTE The notation OUT refers to the function output.
a
It shall be an error if the value of the N input is less than zero.
2.5.1.5.4 Selection and comparison functions
Selection and comparison functions shall be overloaded on all data types. The standard graphical
representations, function names and descriptions of selection functions shall be as shown in table 27.
The standard graphical representation, function names and symbols, and descriptions of comparison
functions shall be as defined in table 28. All comparison functions (except NE) shall be extensible.
Comparisons of bit string data shall be made bitwise from the most significant to the least significant
bit, and shorter bit strings shall be considered to be filled on the left with zeros when compared to
longer bit strings; that is, comparison of bit string variables shall have the same result as comparison
of unsigned integer variables.
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 60 –
61131-3 
 IEC:2003(E)

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   49   50   51   52   53   54   55   56   ...   158




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