TO_BCD_BOOL

TO_BCD_BOOL

PROGRAM TO_BCD_BYTE_DEMO
   VAR
     BOOL1: BOOL;
        U: UDINT;
   END_VAR
 BOOL1:= TO_BCD_BOOL(IN1:=U);
END_PROGRAM

The function performs conversion of an integer (ANY_INT) to a logical value (BOOL). The value of 0 is converted to FALSE, all other values are converted to TRUE.

InputType Description
IN1 ANY_INTInput value
OutputTypeDescription
BOOLOutput value

  • © Energocentrum Plus, s.r.o. 2017 - 2024