6 - 75 6 - 75
MELSEC-Q/QnA
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 range n-points from the device at
S
or
D
exceeds the relevant device.
(Error code: 4101)
• The data n-points from the device designated by
S
is outside the 0 to 9999 range.
(Error code: 4100)
• The
S
and
D
devices overlap. (Error code: 4101)
(2) See Section 3.6 for information regarding errors during index modification.
[Program Example]
(1) The following program converts BIN 16-bit data the number of points from D100 corresponding
to the value stored at D0 to BCD when X20 goes ON, and stores the result following D200.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
BCD
conversions
0 1 0 1 0 1 0 0 0 0 1 100 1 0
0 1 0 0 0 1 0 0 0 1 0 001 0 0
0 0 1 1 0 0 1 0 0 0 0 100 0 0
0 0 0 1 0 1 0 1 0 0 1 110 0 0
0 0 0 1 0 0 0 1 0 1 0 111 0 0
0 0 0 0 1 1 0 0 1 0 0 010 1 0
3
D0
D200 BCD 5432
D202 BCD 3210
D201 BCD 4444
D100 BIN 5432
D102 BIN 3210
D101 BIN 4444
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
2000
1000
800
400
200
100
80
40
20
10
8
4
2
1
4000
8000
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com