Specifications
7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-19
Program Example (16-bit)
WAND D0 D2 D4
X0
0000111111111111
00000000 00011 111
000 00 000000 0 011 1
WAND
b15 b00
Before
execution
After
execution
D0
D2
D4
D
27 WOR
S1 S2 D Logic or (OR) operation
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the logical add of the 16-bit data of device
S1
and the
16-bit data of device
S2
per bit, and stores the result into the device
D
.
Program Example (16-bit)
00 111111
00 0 0 0 011 1 1
00 00
11 1
WOR
b15 b00
0000 0011
0111 0 1
11111111 1
Before
execution
After
execution
D0
D2
D4
00 111111
00 0 0 0 011 1 1
00 00
11 1
b15 b00
0000 0011
0111 0 1
11111111 1
00 111111
00 0 0 0 011 1 1
00 00
11 1
WOR
b15 b00
0000 0011
0111 0 1
11111111 1
WOR D0 D2 D4
X0
WOR D0 D2 D4
X0
Before
execution
After
execution
D0
D2
D4
00 111111
00 0 0 0 011 1 1
00 00
11 1
b15 b00
0000 0011
0111 0 1
11111111 1
D
28 WXOR
S1 S2 D
Performs the exclusive
logical add
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨϨϨϨϨϨϨϨϨϨ
S2
ϨϨϨϨϨϨϨϨϨϨϨ
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Performs the exclusive OR of the 16-bit data of device
S1
and the
16-bit data of device
S2
per bit, and stores the result into the device
D
.
Program Example (16-bit)
00 111111
00 0 0 0 011 1 1
00 0011 0
WOR
b15 b00
0000 0011
0111 0 1
11001111 0
WXOR D0 D2 D4
X0
Before
execution
After
execution
D0
D2
D4
00 111111
00 0 0 0 011 1 1
00011
b15 b00
0000 0011
0111 0 1
11 1111
D
29 NEG
D Complementary of 2
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
D
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Once the command is executed, the assigned device,
D
, will be
served as the complementary of 2.
It is generally advised to use the pulse wave contact to drive this