Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 635

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

Advertisement

• When the lengths of the character string data in the devices specified by (s1) and (s2) are different, the longer character string data is greater.
b15
∙∙∙
b8
b7
∙∙∙
b0
(s1)
32H (2)
31H (1)
(s1)+1
34H (4)
33H (3)
(s1)+2
36H (6)
35H (5)
(s1)+3
00H
37H (7)
"1234567"
 Instruction symbol (ladder, FBD/LD)
$=, EQ
$<>, NE
$>, GT
$<=, LE
$<, LT
$>=, GE
• The character string in the device specified by (s1) or (s2) exceeds 16383 characters, the operation result will be non-
continuity (ENO OFF).
• If the LDSTRING_ instruction is used in the program written in FBD/LD, use a left rail or a variable/constant which is
always on for EN.
• If the ORSTRING instruction is used in the program written in FBD/LD and EN is set to TRUE, ENO turns on. EN will not
be an execution condition.
Operation error
There is no operation error.
The character string comparison instructions perform the following checks while comparing character strings.
• Checking whether the device area range is exceeded
• Checking whether the character string is within 16383 characters
If 00H does not exist in the device area or the character string exceeds 16383 characters and a character
mismatch is detected, the instruction outputs comparison operation results without causing non-continuity
(ENO OFF).
The following example shows the operation result when the last device number of the device area is D12287.
$<>
"ABCDEF"
(1) The second character of (s1) differs from that of (s2) ((1)(s2)), and accordingly the operation result will be
continuity (ENO OFF).
(2) D12287 and later are outside the device area, and accordingly character string data comparison is
performed using data up to D12287.
Since a character string mismatch has been detected, the condition is satisfied and processing ends.
b15
∙∙∙
b8
b7
(s2)
32H (2)
31H (1)
(s2)+1
34H (4)
33H (3)
>
(s2)+2
36H (6)
35H (5)
(s2)+3
00H
"123456"
(s1)
(s2)
M0
D12287
∙∙∙
b0
00H
Result
Non-continuity state (ENO is off.)
Continuity state (ENO is on.)
Continuity state (ENO is on.)
Non-continuity state (ENO is off.)
Non-continuity state (ENO is off.)
Continuity state (ENO is on.)
(s1)
<>
D12287
"ABCDEF"
(2)
(1)
7 APPLICATION INSTRUCTIONS
(s2)
b15∙∙∙b8
b7∙∙∙b0
"Z"
"A"
Outside the device area
7.8 String Processing Instructions
7
633

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents