FB_CopyExceptionList - General Information

Overview

Type:

Function block

Available as of:

V1.0.4.0

Inherits from:

-

Implements:

-

Task

Create a copy of the exception list to display it as an HMI or to perform own evaluations.

Description

The exception list is only copied when it has changed. For this purpose, communication takes place in the exception list is using the functions that manipulate the list via the udiExceptionListChangeCounter variable. This communication is "multi-user" capable. This means that in a given project any number of instances of the FB_CopyExceptionList POU can be used to maintain one copy of the exception list.

As a result, the variables that display how long an exception has already been active (todElapsedTime) are not updated. If these time stamps are relevant to the user, he can force an update of the time stamps independent of the copying of the exception list. To do this he must use the i_timElapsedTimeUpdate input. The copy of the list is saved in the iq_astException variable. The number of exceptions in the list is output using the iq_uiNumberOfExceptions variable.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any actions.

i_xCopy

BOOL

Enabling/disabling the copying process.

i_timElapsedTimeUpdate

TIME := t#2s

How old may the time stamps (todElapsedTime) be that display how long an exception has been contained in the list? The time stamps will be updated at least every i_timElapsedTimeUpdate. If the input is set to T#0ms, the function is disabled. The time stamps are only updated if the exception list is copied. As the time stamps are only used for display in the visualization and on the HMI, a value between T#500ms and T#2s is recommended for this input.

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active and has to be executed further.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and accepts user commands.

FALSE: the POU is not ready to operate and does not accept user commands.

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value unequal GD.ET_Diag.Ok equates an error 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_stExceptionList

ST_ExceptionList

Exception list from which the exceptions shall be copied.

iq_astException

ARRAY[1..Gc_udiMaxNumberOfExceptions] OF ST_Exception

In this array, the copy of the exception list is saved.

iq_udiNumberOfExceptions

UDINT

Number of assigned exceptions in the copy of the exception list.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

22

Diagnostic message disabled

OK

ElapsedTimeUpdated

82

Elapsed time has been updated

OK

ExceptionListCopied

80

The exception list was copied

OK

ExceptionListNoChange

81

The exception list did not change.

OK

Initializing

37

Initialization

OK

WaitForCopy

50

Waiting for copy job

UnexpectedProgramBehavior

InitExceptionListFailed

46

Initialization of the exception list failed.

Disabled

Enumeration name:

Disabled

Enumeration value:

22

Description:

Diagnostic message disabled

The function block is disabled and executes no actions whatsoever. i_xEnable and q_xActive are set to FALSE

ElapsedTimeUpdated

Enumeration name:

ElapsedTimeUpdated

Enumeration value:

82

Description:

Elapsed time has been updated

The time how long an exception is already active was updated in the copy of the exception list.

ExceptionListCopied

Enumeration name:

ExceptionListCopied

Enumeration value:

80

Description:

The exception list was copied

The exception list has been copied

ExceptionListNoChange

Enumeration name:

ExceptionListNoChange

Enumeration value:

81

Description:

The exception list did not change.

The exception list was not copied. The exception list did not change since the last copy job.

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.

Initializing

Enumeration name:

Initializing

Enumeration value:

37

Description:

Initialization

The function block is bein initialized and thus is not yet ready to receive commands at its inputs.

The function block will signalize that it is ready for operation with the signal q_xReady = TRUE.

WaitForCopy

Enumeration name:

WaitForCopy

Enumeration value:

50

Description:

Waiting for copy job

The POU has completed its initialization and is waiting for an i_xCopy = TRUE before continuing the processing.