F_BA_MapUDIToRawByte

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.
![]() | 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
Inputs/outputs
Name | Type | Description |
|---|---|---|
nPresentValue | UDINT | The value to convert. |
Inputs
Name | Type | Description |
|---|---|---|
stRawValue | POINTER TO ST_BA_Byte | Raw byte structure pointer. |
eMappingMode | Mapping mode. | |
nDefaultValue | UDINT | Default value in case of an error. |
