FB_TempCtrlAdaptFm33xx_TcPfw()

FB_TempCtrlAdaptFm33xx_TcPfw() 1:

The I/O data of FM3312 or FM3332 fieldbus modules are adapted to the I/O structures of the library.

This function block must be called in the application. It organizes internally the complete temperature control.

Syntax

VAR_INPUT
FM_Input  : POINTER TO ST_TcPfw_FM3332_Input;
ZoneIdx   : INT;
FirstFmIdx: INT;
LastFmIdx : INT;
END_VAR
VAR_OUTPUT
Error     : BOOL;
END_VAR

FB_TempCtrlAdaptFm33xx_TcPfw() 2: Inputs

Name

Type

Description

FM_Input

POINTER TO ST_TcPfw_FM3332_Input

The address of a single variable or an array of type ST_TcPfw_FM3332_Input.

ZoneIdx

INT

The index of the zone to which the process image is to be assigned.

FirstFmIdx

INT

The first index of the process image provided as FM_Input.

LastFmIdx

INT

The last index of the process image provided as FM_Input.

FB_TempCtrlAdaptFm33xx_TcPfw() 3: Outputs

Name

Type

Description

Error

BOOL

Any problems with call parameters or zone parameters are signaled here.

Behavior of the function block:

If one of the call parameters is outside the permissible range, this is reported with Error. Furthermore, Error is reported if the call parameters are correct but the addressed zone has an invalid setting in aaaPfwTempMparamFromHmi[ZoneIdx].TermChannel in its parameters.

Two modes can be used here:

Note

The same image is used for modules with less than 32 inputs. The channels not implemented in the module's hardware then remain unused, but are counted when determining the input index as described above.

Otherwise the data of the ST_TcPfw_FM3332_Input process image is converted to the ST_TcPfw_TempCtrlInput process image of the zone:

  • The process value for the actual temperature is compatible and is copied.
  • An EL_SnsWcState for connection monitoring is derived from the DpState.
  • The bit in OpenCircuit[..] belonging to the measuring channel is mapped as SNS_Overrange bit in KL_SnsState.
  • The bit in Backvoltage[..] belonging to the measuring channel is mapped as SNS_GeneralError bit in KL_SnsState.