AH500 Programming Manual 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. b0 b15 D0 Y0.1=OFF b0 b15 D0 Y0.1=ON 6-276 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 S D n Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (7 steps) AH500 AH500 AH500 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0