12Inverting The Result Of An Operation - Mitsubishi Electric FX2N Beginners Manual

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

The Basic Instruction Set
If the input condition of the MC instruction evaluates false the states of the devices between the
MC and MCR instructions change as follows:
Latched timers and counters and devices that are controlled with SET an RST instructions
retain their current state.
Unlatched timers and devices that are controlled with OUT instructions are reset.
(See chapter 4 for details on these timers and counters.)
3.4.12
Inverting the result of an operation
Instruction
INV
The INV instruction is used on its own without any operands. It inverts the result of the opera-
tion that comes directly before it:
If the operation result was "1" it is inverted to "0"
If the operation result was "0" it is inverted to "1".
Ladder Diagram
X001
0
The above example produces the following signal sequence:
Operation result before the
INV instruction
Operation result after the
INV instruction
The INV instruction can be used when you need to invert the result of a complex operation. It
can be used in the same position as the AND and ANI instructions.
The INV instruction cannot be used at the beginning of an operation (circuit) like an LD, LDI,
LDP or LDF instruction.
3 – 20
Function
Invert, reverses the result of an operation
X002
Y000
INV instruction
1
X001
0
1
X002
0
1
0
1
Y000
0
An Introduction to Programming
Symbol
GX Works2 FX
Instruction List
0
LD
X001
1
AND
X002
2
INV
3
OUT
Y000
MITSUBISHI ELECTRIC
t

Advertisement

Table of Contents
loading

Table of Contents