6 - 18 6 - 18
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
Usable Devices
Internal Devices
(System, User)
MELSECNET/10(H)
Direct J
\
Set
Data
Bit Word
File
Register
Bit Word
Special
Function
Module
U
\G
Index
Register
Zn
Constant
K, H
Other
S1
S2
D
[Instruction Symbol] [Execution Condition]
indicates the signs +/−
Command
Command
P
+, -
+P, -P
S1 S2
D
S1
S2
D
[Set Data]
Set Data Meaning Data Type
S1
Data to be added to or subtracted from, or the first number of the device
storing such data
S2
Addition or subtraction data, or first number of device storing addition or
subtraction data
D
First number of device storing addition or subtraction data
BIN 16 bits
[Functions]
+
(1) Adds 16-bit BIN data designated by
S1
to 16-bit BIN data designated by
S2
and stores at the
device designated by
D
.
+5678 (BIN)
b15- - - - - - - - -b0
6912 (BIN)1234 (BIN)
S1 S2
D
b15- - - - - - - - -b0 b15- - - - - - - - -b0
(2) Values for
S1
,
S2
and
D
can be designated from -32768 to 32767 (BIN 16 bits).
(3) The judgment of whether data is positive or negative is made by the most significant bit (b15).
• 0 ..........Positive
• 1 ..........Negative
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
• K32767 +K2
(H7FFF)
• K-32768 +K-2
(H8000)
(H0002)
(HFFFE)
K-32767......A negative value is generated if b15 is 1.
K32766.......A positive value is generated if b15 is 0.
(H7FFE)
(H8001)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com