Below are the standard functions for converting a data into another data type:

Function

Conversion

ANY_TO_BOOL
ANY_TO_SINT
ANY_TO_INT
ANY_TO_DINT
ANY_TO_LINT
ANY_TO_REAL
ANY_TO_LREAL
ANY_TO_TIME
ANY_TO_STRING
NUM_TO_STRING

converts to boolean
converts to small (8 bit) integer
converts to 16 bit integer
converts to integer (32 bit - default)
converts to long (64 bit) integer
converts to real
converts to double precicion real
converts to time
converts to character string
converts a number to a string

Below are the standard functions performing conversions in BCD format (*):

Function

Conversion

BIN_TO_BCD
BCD_TO_BIN

converts a binary value to a DCB value
converts a BCD value to a binary value

(*) BCD conversion functions may not be supported by all targets.

Type conversion functions

IEC 61131-3 Automation platform > Programming - Reference guide > Type conversion functions

Previous chapterNext chapter


Created with the Personal Edition of HelpNDoc: Effortlessly Create High-Quality Help Documentation with a Help Authoring Tool