FC_InitMachineInterface

 

FC_InitMachineInterface - General Information

Overview

Type:

Function

Available as of:

-

Support for:

PacDrive pilot template architecture

Task

Initializes the parts of the interface of the MainMachine.

Description

This function is used to setup a software module to act as a machine layer. The typical use is to setup a module to act as the “machine” to provide overall control of the machine.

The user may only change the values on the inputs i_xEnable, i_xLogEnable, i_wLogData­Filter and i_wExceptionLogDataFilter.

The machine is activated via the i_xEnable input, which activates important POUs of the machine layer such as axis modules, axis module controllers, and module controllers.

This function automatically assigns a unique module ID to the axes contained in the machine module.

How to create the module ID of an axis can be read in the chapter "Identification and labeling of modules".

The wiring of the inputs can be seen in the following figure. Also for the above mentioned inputs that can be changed, it is strongly recommended to use the suggested default values.

G-SE-0065157.1.gif-high.gif

 

 

Interface

Input

Data type

Description

i_xEnable

BOOL

Activates the module.

i_udiMainModuleId

UDINT

Unique number used to identify the module

The module ID identifier can be used to filter the global detected error list and/or the global logger list. The main machine must be given the Id 1.

i_xLogEnable

BOOL

Enables the logging function.

i_wLogDataFilter

WORD

Specifies the events to be recorded.

i_sModuleTypeName

STRING[80]

Specifies a name the module is identified with.

i_dwModuleType

DWORD

Unique number to identify the type of module

i_udiModuleVersion

UDINT

Specifies the software version of the module type

i_udiNumberOfSubModules

UDINT

Specifies the quantity of sub-modules contained by this module

i_pstSubModuleItf

POINTER TO ST_StandardModuleInterface

A pointer to the default module interface of the submodules.

i_wExceptionLogDataFilter

WORD

Log filter for the exception handling (actions on the exception list)

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

Input/Output

Data type

Description

iq_stMachineItf

ST_StandardModuleInterface

Specifies the default module interface

iq_stExceptionList

ST_ExceptionList

Global exception list

iq_stLogDataList

ST_LogDataList

Specifies the global logging list.

iq_stLoggerItf

ST_LoggerInterface

Data structure to control displaying and saving the logger.

Return Value

Data type

Description

BOOL

 

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok