15.2.22 FC 21 - LEN - Length of a STRING variableA 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 thecurrent 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 DescriptionS* INPUT STRING D, L Input variable in format STRINGRET_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 - LIMITThe function FC 22 limits the number value of a variable to limit values which can haveparameters 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 DescriptionMN INPUT ANY I, Q, M, D, L Lower limitIN INPUT ANY I, Q, M, D, L Input variableMX INPUT ANY I, Q, M, D, L Upper limitRET_VAL OUTPUT ANY I, Q, M, D, L Limited output variable15.2.24 FC 23 - LT_DT - Compare DT for smaller thanThe function FC 23 compares the contents of two variables in the formatDATE_AND_TIME to determine if one is smaller to the other and outputs the result of thecomparison as a return value. The return value has the signal state "1" if the time atparameter DT1 is smaller (older) than the time at parameter DT2. The function does notreport any errors.DescriptionParameterDescriptionParameterDescriptionVIPA SPEED7 StandardIEC > FC 23 - LT_DT - Compare DT for smaller thanHB00 | OPL_SP7 | Operation list | en | 18-30 813