FB_MonitorSystemExceptionTpi - General Information

Overview

Type:

Function Block

Available as of:

V1.1.0.0

Support for:

PacDrive pilot template architecture

Task

POU for updating the global exception list and the global logging list.

Description

This POU is used to verify for system errors that have been detected and to produce appropriate reactions to the axes. The function also updates the global exception list and the global logging list when a system error has been detected. The global exception list is determined via the iq_stExceptionList input and contains the active exceptions. The global logging list is specified with the iq_stLogDataList input and it holds the last 100 exceptions (default). This default can be modified by changing the value of TPL.Gc_udiMaxNumberOfExceptions. A new exception will replace the oldest error detected once the logging list is full. The logging list can also contain other events.

The PacDrive3 controller monitors itself for hardware and program execution difficulties. These difficulties are reported through diagnostic codes and a diagnostic message. The information associated with these system errors that are detected is similar to the information that is associated with user defined exceptions so the nature of the exception and who created it is detected. Several examples of system errors that are detected are shown below:

  • 8130 Braking resistor Temperature Too High

  • 8125 Motor load too high

  • 8320 Bad Array Access

The POU classifies the possible system difficulties into one of three system errors that are detected based on the diagnostic class of the exception as follows:

System error

Diagnostic class

diDiagCode

assigned error reaction

System Error 1

4

8000 < diDiagCode < 8300

TPL.ET_Reaction.AsyncStop

System Error 2

3

8300 <= diDiagCode < 8600

TPL.ET_Reaction.SyncStopEl

System Error 3

1 and 2

8600 <= diDiagCode

TPL.ET_Reaction.SyncStopEh

When a detected system error becomes active the following occurs:

  • An exception is added to the global exception list

  • An exception is placed into the global logging list provided the appropriate filter is on.

  • The pre-assigned reaction is then distributed to axes by the FB_ExceptionHandlerTpi function block which continually scans the global exception list for new exceptions.

  • The reaction is placed into the global logging list provided the appropriate filter is on.

When a detected system error becomes inactive the following occurs:

  • The exception is removed from the global exception list with the FB_ExceptionHandlerTpi POU.

  • An exception quit event is placed into the global logging list provided the appropriate filter is on.

  • An exception quit event is placed into the global logging list provided the appropriate filter is on.

The following information is assigned to a detected system error when the exception is contained in the global error detection list and the global logging list:

  • The system diagnostic message (PacDrive3.DiagMsg) is assigned to the message.

  • The system diagnostic code (PacDrive3.DiagCode) is assigned to the message.

  • TPL.ET_ExceptionSource.Main is assigned to the source of the exception.

  • The HMI attribute is assigned to zero.

This is a function block that will require an instance of it to be declared.

Interface

Input

Data type

Description

i_xEnable

UDINT

Switches the POU on and off.

i_xStart

UDINT

Start the functionality

Output

Data type

Description

q_xActive

BOOL

Indicates the function block is enabled and processing correctly

q_xReady

BOOL

The POU is ready to receive jobs.

q_etDiag

GD.ET_Diag

Diagnostic class

q_etDiagExt

ET_DiagExt

Diagnostic message

q_sMsg

STRING[80]

Provides the results corresponding status message

Input/Output

Data type

Description

iq_stMachineItf

ST_StandardModuleInterface

Specifies the default module interface for the machine

iq_stExceptionList

ST_ExceptionList

Specifies the global error detection list

iq_stLogDataList

ST_LogDataList

Specifies the global logging list

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

22

Diagnostic message disabled

OK

WaitForStart

158

Waiting for starting command.

OK

Working

47

The POU processes the function

Disabled

Enumeration name:

Disabled

Enumeration value:

22

Description:

Diagnostic message disabled

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

158

Description:

Waiting for starting command.

Working

Enumeration name:

Working

Enumeration value:

47

Description:

The POU processes the function