F_BA_MapFromRawByte

F_BA_MapFromRawByte 1:

The F_BA_MapFromRawByte function converts a raw byte value into a process value. The input variable nRawValue is converted according to the selected mapping mode eMode. If the conversion fails, the nDefaultValue is used.

F_BA_MapFromRawByte 2:

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

Syntax

FUNCTION F_BA_MapFromRawByte : BOOL
VAR_INPUT
  nRawValue      : BYTE;
  nDefaultValue  : BYTE;
  eMode          : E_BA_ByteMappingMode := E_BA_ByteMappingMode.eIndex1N;
END_VAR
VAR_OUTPUT
  nResult        : BYTE;
END_VAR

F_BA_MapFromRawByte 3: Inputs

Name

Type

Description

nRawValue

BYTE

The raw value to convert.

nDefaultValue

BYTE

Default value in case of an error.

eMode

E_BA_ByteMappingMode

Mapping mode (Default: eIndex1N.)

F_BA_MapFromRawByte 4: Outputs

Name

Type

Description

nResult

BYTE

The converted value.