Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-31
5.3.9 WXOR (FNC 28)
Operation:
The bit patterns of the two source devices are
anal
y
zed (the contents of S
2
is compared a
g
ainst
the contents of S
1
). The result of the lo
g
ical XOR
anal
y
sis is stored in the destination device (D).
The followin
g
rules are used to determine the result of a lo
g
ical XOR operation. This takes
place for ever
y
bit contained within the source devices:
General rule: (S
1
)Bit
n
WXOR (S
2
)Bit
n
= (D)Bit
n
1 WXOR 1 = 0 0 WXOR 1 = 1
1 WXOR 0 = 1 0 WXOR 0 = 0
5.3.10 NEG (FNC 29)
Operation:
The bit pattern of the selected device is inverted.
This means an
y
occurrence of a ‘1’ becomes a ‘0’
and an
y
occurrence of a ‘0’ will be written as a ‘1’.
When this is complete, a further binar
y
1 is added to the bit pattern. The result is the total
lo
g
ical si
g
n chan
g
e of the selected devices contents, e.
g
. a positive number will become a
ne
g
ative number or a ne
g
ative number will become a positive.
Mnemonic Function
Operands
Program steps
S1 S2 D
WXOR
FNC 28
(Lo
g
ical
exclusive
OR)
A lo
g
ical XOR is
performed on the
source devices -
result stored at
destination
K, H
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
WXOR,
WXORP:
7 steps
DXOR,DXORP
13 steps
Mnemonic Function
Operands
Program steps
D
NEG
FNC 29
(Ne
g
ation)
Lo
g
icall
y
inverts
the contents of
the desi
g
nated
device
KnY, KnM, KnS,
T, C, D, V, Z
NEG,NEGP:
3 steps
DNEG,
DNEGP:
5 steps
X2
WXOR
D 10 D 12 D 14
[ S1 ] [ D ][ S2 ]
X0
[ D ]
D 10
NEG