F_BA_MapUDIToRawByte

F_BA_MapUDIToRawByte 1:

The F_BA_MapUDIToRawByte function converts a UDINT value to a raw byte value. The input/output variable nPresentValue is converted to a raw byte value according to the selected mapping mode eMappingMode, and this value is written to the structure stRawValue.

F_BA_MapUDIToRawByte 2:

This function is used to convert UDINT process values to raw byte formats.

Syntax

FUNCTION F_BA_MapUDIToRawByte : BYTE
VAR_IN_OUT
  nPresentValue  : UDINT;
END_VAR
VAR_INPUT
  stRawValue     : POINTER TO ST_BA_Byte;
  eMappingMode   : E_BA_ByteMappingMode;
  nDefaultValue  : UDINT;
END_VAR

F_BA_MapUDIToRawByte 3: Inputs/outputs

Name

Type

Description

nPresentValue

UDINT

The value to convert.

F_BA_MapUDIToRawByte 4: Inputs

Name

Type

Description

stRawValue

POINTER TO ST_BA_Byte

Raw byte structure pointer.

eMappingMode

E_BA_ByteMappingMode

Mapping mode.

nDefaultValue

UDINT

Default value in case of an error.