10.10 Fnc 29 - Neg / Negation - Mitsubishi Electric FX3G SERIES Programming Manual

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

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
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
P
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 C D R U \G
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.
→ For the Floating point negation ENEG (FNC128), refer to Section 18.16.
Mnemonic
16-bit Instruction
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.
D
D
)+1 →
(
] 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
V
D
D
D
D
) +1 = (
+ 1,
)
10.10 FNC 29 – NEG / Negation
Mnemonic
Operation Condition
Continuous
DNEG
5 steps
Operation
Pulse (Single)
DNEGP
Operation
Data type
16- or 32-bit binary
Others
Con-
Real
Charac-
Index
stant
Number
ter String
Z Modify K H
E
" "
1
2
3
4
Pointer
5
P
6
7
8
9
10
291

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents