FC_DisableAllSubModules - General Information

Overview

Type:

Function

Available as of:

V1.0.4.0

Task

The function is used to switch off lower-level modules at the same time.

Description

This is a simple function used to deactivate all lower-level modules. The i_pstSubModulesItf field switches on all modules via their interface variable astSubModuleInterface[Index].i_xEnable = False.

Interface

Input

Data type

Description

i_udiNumberOfSubModules

UDINT

Number of modules in the i_pstSubModulesItf field

i_pstSubModulesItf

POINTER TO ST_StandardModuleInterface

Address of the field for the default interfaces of the subordinate modules.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an error message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Error message

Return Value

Data type

Description

BOOL

TRUE: All submodules have been disabled.

FALSE: Not all subordinate modules could be disabled.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

NumberOfSubModulesRange

66

The number of submodules is outside the specified range

InputParameterInvalid

PointerSubModulesItfInvalid

97

The pointer SubModulesItf is invalid

NumberOfSubModulesRange

Enumeration name:

NumberOfSubModulesRange

Enumeration value:

66

Description:

The number of submodules is outside the specified range

Issue

Cause

Solution

-

The input i_udiNumberOfSubModules has a value < 1

On the input i_udiNumberOfSubModules a value greater than zero has to be given

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

All lower level modules are commanded to switch off.

PointerSubModulesItfInvalid

Enumeration name:

PointerSubModulesItfInvalid

Enumeration value:

97

Description:

The pointer SubModulesItf is invalid

Issue

Cause

Solution

-

The input i_pstSubModulesItf is zero

On the input i_pstSubModulesItf, the address of the array which holds the SubMoules interface structures has to be given.