Справочник Пользователя для Mitsubishi Electronics QCPU

Скачать
Страница из 1204
6-97
EDNEG(P)
1
2
3
4
4
6
7
8
6
.3 Data conversion
 instructions
6
.3.13 Floating-po
int sign inver
tion (
D
ouble pr
ecision)
 (EDNEG(P)
)
6.3.13  
Floating-point sign invertion (Double precision) 
(EDNEG(P))
EDNEG(P)
Function
(1) Reverses the sign of the 64-bit floating decimal point type real number data designated by 
, and stores at the device designated by 
.
(2) Used when reversing positive and negative signs.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and 
an error code is stored into SD0.
 • The value of the specified device is not in the following range:
(Error code: 4140)
0, 2
-1022
 | value of specified device | < 2
1024
 • The value of the designated device is  0. 
(Error code: 4140)
Program Example
(1) The following program inverts the sign of the 64-bit floating decimal point type real number 
data at D100 to D103 when X20 goes ON, and stores result at D100 to D103.
[Ladder Mode]
[List Mode]
[Operation]
:
 
Head number of the devices where the 64-bit floating decimal point data whose sign is to be reversed is 
stored (real number)
Setting 
Data
Internal Devices 
R, ZR
J
\
U
\G
Zn
Constants
Other
Bit
Word
Bit
Word
––
––
Universal
Basic
Process
High
performance
Redundant
Command
Command
EDNEG
EDNEGP
D
D
EDNEG
EDNEGP
D
D
D
D
Step
Instruction
Device
D1
D0
D3
D2
D1
1.2345
D0
D3
D2