6 - 48 6 - 48
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
[Program Example]
(1) When X20 is ON, the program performs additions of the following data:
• The data in the number (value stored in D0) of devices starting from D100
• The data in the number (value stored in D0) of devices starting from R100
Then the program stores the addition results at the number (value stored in D0) of devices
starting from D200.
[Ladder Mode] [List Mode]
Steps
Instruction Device
(BIN)
D101
(BIN)
(BIN)
(BIN)
b15 - - - - - - - b0
D100
D102
D103
+
1234 (BIN)
R1
2032 (BIN)
-1000 (BIN)
-3252 (BIN)
R0
R2
R3
6789
7821
3520
5432
8023 (BIN)
D201
9853 (BIN)
2520 (BIN)
2180 (BIN)
D200
D202
D203
4
D0
b15 - - - - - - - b0 b15 - - - - - - - b0
(2) When X1C is ON, the following program subtracts the constant 8765 from the data in three
devices starting from D100.
Then the program stores the subtraction results at the number of the three devices starting
from R0
[Ladder Mode] [List Mode]
K8765
K3
5
Steps
Instruction
Device
(BIN)
D101
(BIN)
(BIN)
b15 - - - - - - - b0
D100
D102
12345
8701
3502
3580 (BIN)
R1 -64 (BIN)
-5263 (BIN)
R0
R2
8765 (BIN)
b15 - - - - - - - b0
b15 - - - - - - - b0
-
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com