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


Table 29 - Standard character string functions


Download 1.35 Mb.
Pdf ko'rish
bet58/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   54   55   56   57   58   59   60   61   ...   158
Bog'liq
ourdev 569653

Table 29 - Standard character string functions
No.
Graphical form
 a
Explanation/example
8
+---------+
| REPLACE |
ANY_STRING--|IN1 |--ANY_STRING
ANY_STRING--|IN2 |
ANY_INT-----|L |
ANY_INT-----|P |
+---------+
Replace L characters of IN1 by IN2,
starting at the P-th character position
Example:
A :=
REPLACE(IN1:='ABCDE',IN2:='X',
L:=2, P:=3) ;
is equivalent to
A := 'ABXE' ;
9
+--------+
| FIND |
ANY_STRING--|IN1 |--ANY_INT
ANY_STRING--|IN2 |
+--------+
Find the character position of the beginning of
the first occurrence of IN2 in IN1. If no
occurrence of IN2 is found, then OUT := 0.
Example:
A := FIND(IN1:='ABCBC',IN2:='BC')
;
is equivalent to A := 2 ;
NOTE The examples in this table are given in the Structured Text (ST) language defined in 3.3.
2.5.1.5.6 Functions of time data types
In addition to the comparison and selection functions defined in 2.5.1.5.4, the combinations of input
and output time data types shown in table 30 shall be allowed with the associated functions.
It shall be an error if the result of evaluating one of these functions exceeds the implementation-
dependent
range of values for the output data type.
Table 30 - Functions of time data types
Numeric and concatenation functions
No.
Name
Symbol
IN1
IN2
OUT
1a
c,d
ADD
+
TIME
TIME
TIME
1b
c,d
ADD_TIME
+
TIME
TIME
TIME
2a
ADD
b
+
b
TIME_OF_DAY
TIME
TIME_OF_DAY
2b
ADD_TOD_TIME
+
b
TIME_OF_DAY
TIME
TIME_OF_DAY

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   54   55   56   57   58   59   60   61   ...   158




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