FC_UpdateAddInterfaceStruct

 

FC_UpdateAddInterfaceStruct - General Information

Overview

Type:

Function

Available as of:

V1.0.4.0

Versions:

Current version

Task

This function is used to handle submodules of type MultiBelt module within the Update_Structs action of a node equipment module.

Description

The function updates the link to the MultiBelt module within the module hierarchy of the template. By using this link you can activate different modules from the template.

Interface

Input

Data type

Description

i_pdwSubModuleAddInterfaces

POINTER TO DWORD

The address in which the additional interfaces of the node are managed must be transferred to the input.

i_udiSubModuleConstant

UDINT

The number of the module within the node must be transferred to the input.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = GD.ET_Diag.Ok -> status message

q_etDiag <> GD.ET_Diag.Ok -> diagnostic message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

Input/Output

Data type

Description

iq_stMultiBeltModuleItf

ST_ModuleInterface

The additional interface of the MultiBelt module must be transferred to the input.

Return Value

Data type

Description

BOOL

Return value of the function, TRUE = Ok.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

SubModuleAddInterfacesInvalidPointer

33

SubModuleAddInterfaces is invalid.

InputParameterInvalid

SubModuleConstantRange

34

SubModuleConstant is outside the valid range.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The link for the MultiBeltModule has been updated successfully in the template.

SubModuleAddInterfacesInvalidPointer

Enumeration name:

SubModuleAddInterfacesInvalidPointer

Enumeration value:

33

Description:

SubModuleAddInterfaces is invalid.

Issue

Cause

Solution

-

An uninitialized pointer (0) was transferred at the i_pdwSubModuleAddInterfaces input.

Make certain that at the i_pdwSubModuleAddInterfaces input the address of the array is transferred in which the additional interfaces of the node are managed.

SubModuleConstantRange

Enumeration name:

SubModuleConstantRange

Enumeration value:

34

Description:

SubModuleConstant is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred at the i_udiSubModuleConstant input.

Ensure that a value greater than or equal to 0 is transferred at the i_udiSubModuleConstant input.