FC_SetException - General Information

Overview

Type:

Function

Available as of:

V1.0.4.0

Task

Function for entering and deleting exceptions in a (global) exception list (ST_ExceptionList).

Description

To add an exception via iq_stException (ST_Exception) to the exception list in iq_stExceptionList (ST_ExceptionList), call the function with i_xExceptionActive := TRUE.

To delete a delayed exception, where timDelayTime > 0, before becoming active or to acknowledge an active exception, where xAutoQuit := TRUE, call the function with i_xExceptionActive := FALSE and the relevant data in iq_stException (ST_Exception) and in iq_stExceptionList (ST_ExceptionList).

This information is also added to the logging list in iq_stLogDataList (ST_LogDataList).

NOTE: The following parameters in iq_stException (ST_Exception) must not be modified in your application. These values are written by the function:
  • todTimeStamp

  • todElapsedTime

  • todReactionTimeStamp

Interface

Input

Data type

Description

i_xExceptionActive

BOOL

TRUE: Add the exception to the specified exception list.

FALSE: Delete a delayed exception before becoming active or acknowledge an active exception where xAutoQuit := TRUE.

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 an exception 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 -> exception message

q_sMsg

STRING[80]

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

Input/Output

Data type

Description

iq_stException

ST_Exception

Exception that shall be entered into the global exception list.

iq_stExceptionList

ST_ExceptionList

Global exception list

iq_stLogDataList

ST_LogDataList

Global log data list

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

DelayStillActiveExceptionNotSet

93

The delay is still active. The exception has not been set yet.

OK

ExceptionRemovedByAutoQuit

91

The exception was removed with AutoQuit.

OK

ExceptionSuccessfullySet

92

The exception was set successfully.

OK

Ok

0

Ok

ControllerConditionInvalid

ControllerInvalid

6

The controller is invalid.

ControllerConditionInvalid

RealtimeClockNotSet

90

The real-time clock was not set.

LimitReached

ExceptionListOverflow

44

Overflow of the exception list

UnexpectedProgramBehavior

InitExceptionListFailed

46

Initialization of the exception list failed.

ControllerInvalid

Enumeration name:

ControllerInvalid

Enumeration value:

6

Description:

The controller is invalid.

Issue

Cause

Solution

-

The controller does not provide the required conditions.

For more details, refer to the q_sMsg output.

DelayStillActiveExceptionNotSet

Enumeration name:

DelayStillActiveExceptionNotSet

Enumeration value:

93

Description:

The delay is still active. The exception has not been set yet.

The delay is still active, the exception has not yet been entered into the global exception list.

ExceptionListOverflow

Enumeration name:

ExceptionListOverflow

Enumeration value:

44

Description:

Overflow of the exception list

Issue

Cause

Solution

-

The maximum number of exceptions in the global exception list specified by the Gc_udiMaxNumberOfExceptions global parameter was exceeded.

Increase the value of the Gc_udiMaxNumberOfExceptions global parameter.

ExceptionRemovedByAutoQuit

Enumeration name:

ExceptionRemovedByAutoQuit

Enumeration value:

91

Description:

The exception was removed with AutoQuit.

The exception has been removed by acknowledging it automatically.

ExceptionSuccessfullySet

Enumeration name:

ExceptionSuccessfullySet

Enumeration value:

92

Description:

The exception was set successfully.

The exception successfully has been entered into the global exception list.

InitExceptionListFailed

Enumeration name:

InitExceptionListFailed

Enumeration value:

46

Description:

Initialization of the exception list failed.

Issue

Cause

Solution

-

Initialization of the exception list failed. - An internal execution error occured.

Try to initialize the exception list using the FC_InitExceptionList function.

Please inform the support team about this error.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

Initialization value of the q_etDiagExt output.

Exception already entered to exception list.

RealtimeClockNotSet

Enumeration name:

RealtimeClockNotSet

Enumeration value:

90

Description:

The real-time clock was not set.

Issue

Cause

Solution

-

The real time clock of the controller has not been set.

Initialize the real time clock of the controller.