Chapter 5 Applied Instructions S : Source device; D : Device in which a check result is stored; n : Bit Explanation whose state is judged The state of the n th bit in S is checked, and the result is stored in D . 16-bit instruction: n =0~15; 32-bit instruction: n =0~31 If KnM/KnS is used, it is suggested that M device numbers/S device numbers should start from a number which is a multiple of 16 in the decimal numeral system, e.g. K1M0 and K4M16 (decimal numeral system). Example If the 15 th bit in D0 is 1 when X0.0 is ON, M0 will be ON. If the 15 th bit in D0 is 0 when X0.0 is ON, M0 will be OFF. When X0.0 is turned OFF, the state of M0 remains unchanged.
b0 M0=Off b15 D0 b0 M0=On b15 D0 5-65 API Instruction code Operand Function Checking the state of a 44 D BON P S, D, n bit Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S D n Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (8 steps ) BON D0 M0 K15 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