Mitsubishi MELSEC QCPU Programming Manual page 161

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS
[Operation Errors]
(1) In the following cases an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored at SD0.
• The code "00H" or non-matching does not exist within the relevant device range following the
device number designated by
POINT
At the same time that it is conducting a character string comparison, character string data
comparison instruction also checks the device range.
For this reason, even in cases where the character string exceeds the device range, the
character string data is compared. If character non-matching is detected within the device
range at this time, the comparison operation results are output without returning an operation
error.
In the example shown above, the
its second character is different from that of
", and the operation result is non-continuity.
S2
In this case, because the non-continuity detection is for D12287 (inside the device range),
there will be no operation error returned.
[Program Example]
(1) The following program compares character strings stored following D0 and characters
following D10.
[Ladder Mode]
(2) The following program compares the character string "ABCDEF" with the character string
stored following D10.
[Ladder Mode]
6 - 10
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
S1
$
D12287
Example
S1
data
S1
"B"
D12287
00H
W0
or
. (Error code: 4101)
S2
D10
M0
S2
"A"
"C"
character string exceeds the device range, but because
S1
, the comparison result is "
S2
[List Mode]
Steps
Instruction
[List Mode]
Steps
Instruction
MELSEC-Q/QnA
data
S2
"Z"
"A"
D10
00H
"C"
D11
does not equal
S1
Device
Device
6 - 10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents