Table of Contents

BCD_TO_ULINT

Function name

BCD_TO_ULINT

ST call

PROGRAM BCD_TO_ULINT_DEMO
  VAR
     W: WORD;
        U: ULINT;
   END_VAR
 U:= BCD_TO_ULINT(IN1:=W);
END_PROGRAM

Description

Function converts a bit array (ANY_BIT) to an integer type. For example, a binary value of 2#0011_0110_1001 is converted to 369 decimal.

Inputs

InputType Description
IN1 ANY_BITInput value

Outputs

OutputType Description
ULINTOutput value

Application example

Conversion of a bit array 2#0001_0002 (decimal 18) to the corresponding integer value of 12.