Chapter 6 Applied Instructions Symbol S : Source device D : Device where the check result is stored n : Bit whose state is checked 6_ Explanation 1. This instruction checks the state of the n th bit in S , and stores the result in D . 2. The operand n used in the 16-bit instruction must be between 0–15. For 32-bit instructions, n must be between 0–31. 3. Only the 32-bit instructions can use the 32-bit counter, but not the device E. Example 1. When M0 is ON, if the value of the 15 th bit in D0 is one, M11 is ON. M11 is OFF if the value of the 15 th bit in D0 is 0. 2. When M0 switches to OFF, the state of M1 remains the same as before M0 switches to OFF.
6-361 API Instruction code Operand Function 1207 D BON P S, D, n Checking the state of a bit Device X Y M S T C HC D FR SM SR E K 16# “$” F S D n BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D n Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3