Chapter 32 String Functions; Detecting A String Length - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

32
STRING FUNCTIONS
32.1

Detecting a String Length

LEN(_E)
RnPCPU
RnCPU RnENCPU
(Process)
These functions detect and output the length of the string input.
Ladder, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Description, type, data type
Argument
EN
s (IN)
ENO
d
Processing details
■Operation processing
• These functions detect the length of the string input to (s), and output the length from (d).
+0
+1
+2
00H (Null character (end of string))
• Input a STRING data type value to (s) within the range of 0 to 255 bytes.
32 STRING FUNCTIONS
1944
32.1 Detecting a String Length
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
[With EN/ENO]
EN
ENO
s
Description
Execution condition (TRUE: Executed, FALSE: Not executed)
Input
Output status (TRUE: Normal, FALSE: Abnormal)
Output
Upper byte
ASCII code (2nd character)
ASCII code (4th character)
ASCII code (6th character)
STRING
Structured text
[Without EN/ENO]
d:=LEN(s);
[With EN/ENO]
d:=LEN_E(EN,ENO,s);
d
(s)
Lower byte
ASCII code (1st character)
ASCII code (3rd character)
ASCII code (5th character)
·
ASCII code ('n'th character)
Type
Data type
Input variable
BOOL
Input variable
ANYSTRING_SINGLE
Output variable
BOOL
Output variable
INT
(d)
String length
INT

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents