31.21.3.4 System Variables Indicating Execution Results - ENCO/ENCOP

Program Example

ENCO

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

  1. When the positive transition instruction turns ON, the ENCO instruction will be executed. When the ENCO instruction is executed, 0000 1000 (8 in hexadecimal) is converted and the binary value 0011 (3) is stored in D1. When using a normally open, the ENCO instruction is always executed as long as the normally open instruction variable remains ON.

ENCOP

  1. The ENCOP and ENCO instructions have different ways of detecting when to execute. In the ENCOP instruction, only the upward transition is detected and the ENCOP instruction is executed even when using a normally open instruction. Even if the normally open instruction variable remains ON, the ENCOP instruction is executed only for one scan.
    For example, when 0x00000008 is input in S1, the output in D1 will be 0x00000003.