7-63
TEST(P),DTEST(P)
1
2
3
4
6
6
7
8
7.4 Bit processing instructions
7.4.2 Bit tests (TEST(P),DTEST(P))
(2) The following program turns Y40 ON or OFF, depending on the status of the 19th bit of the
2-word data (W0 and W1).
[Ladder Mode] [List Mode]
[Operation]
Remark
Programs using the bit test instruction can be rewritten as programs using bit
designation of word devices.
If the program in example (1) were changed to use bit designation of a word
device, it would appear as follows:
Step Instruction Device
1 0 1 1 0 0 1 0 1 0 110 0 00
b31 b19
Turns Y40 OFF since b19 is "0."
1 0 1 1 0 1 1 1 0 1 110 1 10
b0
b15b16
0
1 1
0
1 1
0
1 1 1
0
1
1
0 0
1
b31 b19
Turns Y40 ON since b19 is "1."
1
0
1
0
1 1
0 0 0 0
1
0
1 1
0
1
b0
b15b16
M0
D0.A
Designation of b10 of D0
M0 turns ON/OFF depending on the ON/OFF
status of b10 of D0 (D0.A).