Table of Contents

TO_BCD_BOOL

Function name

TO_BCD_BOOL

ST call

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

Description

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.

Inputs

InputType Description
IN1 ANY_INTInput value

Outputs

OutputTypeDescription
BOOLOutput value

Application example