EasyManua.ls Logo

YASKAWA VIPA SPEED7 - FC 21 - LEN - Length of a STRING Variable

YASKAWA VIPA SPEED7
1007 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
15.2.22 FC 21 - LEN - Length of a STRING variable
A STRING variable contains two lengths:
n Maximum length
It is given in square brackets when the variables are being defined.
n Current length
This is the number of currently valid characters.
The current length is smaller or equal to the maximum length. The number of bytes occu-
pied by a string is 2 greater than the maximum length. The function FC 21 outputs the
current length of a string (number of valid characters) as a return value. A blank string (' ')
has the length zero. The maximum length is 254. The function does not report any errors.
Parameter Declaration Data type Memory area Description
S* INPUT STRING D, L Input variable in format STRING
RET_VAL OUTPUT INT I, Q, M, D, L Number of current characters
*) You can assign only a symbolically defined variable for the parameter.
15.2.23 FC 22 - LIMIT
The function FC 22 limits the number value of a variable to limit values which can have
parameters assigned.
n Variables of the data types INT, DINT, and REAL are permitted as input values.
n All variables with parameters assigned must be of the same data type.
n The variable type is recognized by the ANY pointer.
n MN may not be greater as MX.
n The output value remains unchanged and the BR bit is set to "0" if:
a variable with parameters assigned has an invalid data type.
all variables with parameters assigned do not have the same data type.
the lower limit value is greater than the upper limit value.
a REAL variable does not represent a valid floating-point number.
Parameter Declaration Data type Memory area Description
MN INPUT ANY I, Q, M, D, L Lower limit
IN INPUT ANY I, Q, M, D, L Input variable
MX INPUT ANY I, Q, M, D, L Upper limit
RET_VAL OUTPUT ANY I, Q, M, D, L Limited output variable
15.2.24 FC 23 - LT_DT - Compare DT for smaller than
The function FC 23 compares the contents of two variables in the format
DATE_AND_TIME to determine if one is smaller to the other and outputs the result of the
comparison as a return value. The return value has the signal state "1" if the time at
parameter DT1 is smaller (older) than the time at parameter DT2. The function does not
report any errors.
Description
Parameter
Description
Parameter
Description
VIPA SPEED7
Standard
IEC > FC 23 - LT_DT - Compare DT for smaller than
HB00 | OPL_SP7 | Operation list | en | 18-30 813

Table of Contents

Related product manuals