10.10 Fnc 29 - Neg / Negation - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
10.10 FNC 29 – NEG / Negation
Outline
This instruction obtains the complement of a numeric value (by inverting each bit and adding "1").
This instruction can be used to negate the sign of a numeric value.
1. Instruction format
FNC 29
D
NEG
2. Set data
Operand type
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T
D
Explanation of function and operation
1. 16-bit operation (NEG and NEGP)
Each bit of
D
Command
input
FNC 29
NEGP
2. 32-bit operation (DNEG and DNEGP)
Each bit of [
D
device.
Command
input
FNC 29
DNEGP
Caution
Note that the complement is obtained in every operation cycle in a continuous operation type instruction.
284
Series
→ For the Floating point negation ENEG (FNC128), refer to Section 18.16.
Mnemonic
16-bit Instruction
P
3 steps NEG
NEGP
Word device number which stores data for obtaining complement and will store the
operation result (The operation result will be stored in the same word device number.)
Digit Specification
is inverted (0 → 1, 1 → 0), "1" is added, and then the result is stored in the original device.
)+1 →
D
D
(
] is inverted (0 → 1, 1 → 0), "1" is added, and then the result is stored in the original
+1,
D
D
(
+ 1,
D
10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
C D R U \G
D
D
D
D
) +1 = (
+ 1,
10.10 FNC 29 – NEG / Negation
Mnemonic
Operation Condition
DNEG
5 steps
DNEGP
16- or 32-bit binary
Others
Con-
Real
Index
stant
Number
V
Z Modify K H
E
)
Continuous
Operation
Pulse (Single)
Operation
Data type
Charac-
Pointer
ter String
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents