31.21.2.4 System Variables Indicating Execution Results - BIN/BINP

Program Example

BIN

Converts a constant to binary and stores the converted value in the result data.

  1. When the positive transition instruction turns ON, the BIN instruction will be executed. When the BIN instruction is executed, 0001 0000 (10 in hexadecimal) is converted to binary and the value 1010 is stored in D1. When using a normally open instruction, the BIN instruction is always executed as long as the normally open instruction variable remains ON.

BINP

  1. The BINP and BIN instructions have different ways of detecting when to execute. In the BINP instruction, only the upward transition is detected and the BINP instruction is executed even when using a normally open instruction. Even if the normally open instruction variable remains ON, the BINP instruction is executed only for one scan.
    BIN conversion of S1 (Data_A) = "99999999" BCD to D1 (Data_B).