Chapter 6 Applied Instructions 
6-275 
API 
Instruction code  Operand  Function 
1207  D  BON  P 
S, D, n 
Checking the state of the bit 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#
“$”  DF 
16-bit instruction (7 steps) 
32-bit instruction (7 steps) 
Symbol: 
 
 
S 
Source device  Word/Double word 
D 
Device in which the check result is 
stored 
Bit 
n 
Bit whose state is judged  Word/Double word 
Explanation: 
1.  The state of the n
th
 bit in S is checked, and the result is stored in D. 
2.  The operand n used in the 16-bit instruction should be within the range between 0 and 15, and 
the operand n used in the 32-bit instruction should be within the range between 0 and 31. 
3.  Only the 32-bit instructions can use the 32-bit counter. 
Example: 
1.  When X0.0 is ON, Y0.1 is ON if the value of the 15
th
 bit in D0 is 1. When X0.0 is ON, Y0.1 is 
OFF if the value of the 15
th
 bit in D0 is 0. 
2.  When X0.0 is switched OFF, the state of Y0.1 remains the same as that before X0.0’s being 
OFF.
 
 
0 0 0 1 0 0 1 0 0 0
0 0 0 1
0 0
b0
b15
D0
1 0 0 1 0 0 1 0 0 0
0 0 0 1
0 0
b0
b15
D0
Y0.1=OFF
Y0.1=ON