EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Sign Reverse Instruction

LS Industrial Systems XBC-DR10E
542 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Instruction Details
XBC E-Type Main Unit 6-302 Ve r. 1
6.43 Sign Reverse Instruction
6.43.1 NEG, NEGP, DNEG, DNEGP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x
R.x
Con
st
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
NEG(P)
DNEG(P)
D O O O - O - - - O - - - O O O O 2 - - -
Operand
Description
Data Type
D
Area to convert signs
WORD/DWORD
1) NEG (Negative)
(1) Converts the sign of the value in specified area D to save in D area.
(2) View Monitoring Option is available for monitoring, if signed, and the value converted to negative is
used only in Signed Operation.
P00001
NEGP D00010
Classification
Before executed
After executed
Area
D0010
D0010
Data
-00030(hFFE2)
00030(h001E)
2) DNEG( Double Word Negative )
(1) Changes the sign of the value saved in D, D+1 and saves in D, D+1.
(2) View Monitoring Option is available for monitoring, if signed, and the value converted to negative is
used only in Signed Operation.
P00001
DNEGP D
00010
Classification
Before executed
After executed
Area
D0010, D0011
D0010, D0011
Data
-30 (hFFFFFFE2)
30 (h0000001E)
3) Program Example
(1) Where D0020 value converted to negative and operated as signed.
M00000
NEGP D00020
MULP D00020 2 D10000
NEG, DNEG
means NEG / DNEG
P
NEGP, DNEGP
D
D

Table of Contents

Related product manuals