Data Conversion Using Functions

XG5000 has many functions for converting data between different types.

  • Most of these functions will take the form of original data type on the left of the function name and new data type on the right of the function name.

  • Some Examples are shown in the table below. There are many more conversion functions than the ones listed as examples.

  • These can be found in the Type Conversion category when inserting a function/function block into a program.

Function Name Description
BOOL_TO_BYTE Converts a BOOL variable to a BYTE value.
BYTE_TO_INT Converts a BYTE variable to an INT value.
DINT_TO_REAL Converts a DINT variable to a REAL value.

 

 

 

 

LP312-3