6 - 73 6 - 73
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
High Performance
QnA Q4AR
Basic
QCPU
PLC CPU
Process CPU
6.3.10 Sign reversal for floating decimal point data (ENEG, ENEGP)
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
D
[Instruction Symbol] [Execution Condition]
Command
Command
ENEG
ENEGP
D
D
ENEG
ENEGP
[Set Data]
Set Data Meaning Data Type
D
Head number of device storing floating decimal point data for which sign
will be inverted
Real number
[Functions]
(1) Reverses the sign of the floating decimal point type real number data designated by
D
, and
stores at the device designated by
D
.
(2) Used when reversing positive and negative signs.
[Operation Errors]
(1) There are no errors associated with the ENEG(P) instruction.
[Program Example]
(1) The following program inverts the sign of the floating decimal point type real number data at
D100 and D101 when X20 goes ON, and stores result at D100 and D101.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
D101
1.2345
D100
D101
-1.2345
D100
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com