FB_LoggerPoint - RegisterLoggerPoint (Method)

Overview

Type:

Method

Available as of:

V1.0.4.0

Task

The logger point is registered to the application logger by calling this method. The method RegisterLoggerPoint of the internal FB_LoggerPoint is called to register itself to the application logger.

Description

The logger point is registered to the global application logger.

The machine or program part that sends logger messages via this logger point is defined by the inputs i_sName, i_sType, and i_sSource. This information is linked to every logger message that is sent via this logger point.

The input i_ifParent defines under which other logger point this logger point has to be registered. The global application logger G_ifApplicationLogger is also a logger point.

This is why the logger points can be registered in form of a tree structure that represents the organization of the program.

For further information, see Using the ApplicationLogger.

Interface

Input

Data type

Description

i_ifParent

IF_LoggerPoint

Parent logger point, under which the logger point of the function block has to be registered.

The global application logger G_ifApplicationLogger is also a logger point.

i_sName

STRING[80]

The name of the logger point that is shown in the application logger has to be declared here.

i_sType

STRING[80]

A type has to be given in order to specify the logger node. Via this type, similar parts of the project can be identified, for example module type, function block type.

The function blocks of Schneider Electric libraries set the name of the function block, for example FB_EndlessFeed.

i_sSource

STRING[40]

Source to which the logger messages belongs. The Schneider Electric libraries set the namespace of the library.

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

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

LoggerPointAlreadyRegistered

5

The logger point is already registered.

OK

Ok

0

Ok

ExecutionAborted

MaxNumberOfLoggerPointsExeeded

10

The maximum number of logger points has been exceeded.

ExecutionAborted

ServiceNotRegistered

17

The service is not registered.

InputParameterInvalid

ParentInvalid

6

The parent is invalid.

InputParameterInvalid

ParentNotRegistered

8

The parent is not registered.

UnexpectedProgramBehavior

UnexpectedFeedback

3

A feedback value was invalid.

LoggerPointAlreadyRegistered

Enumeration name:

LoggerPointAlreadyRegistered

Enumeration value:

5

Description:

The logger point is already registered.

The logger point has already been registered before. No additional logging is needed.

MaxNumberOfLoggerPointsExeeded

Enumeration name:

MaxNumberOfLoggerPointsExeeded

Enumeration value:

10

Description:

The maximum number of logger points has been exceeded.

Cause

Solution

Maximum number of logger points exceeded. The application logger itself is also a logger point.

The global parameter Gc_udiMaxNumberOfLoggerPoints has to be set to a value corresponding to the possible logger points of the project.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The logger point has been registered successfully to the application logger.

ParentInvalid

Enumeration name:

ParentInvalid

Enumeration value:

6

Description:

The parent is invalid.

Cause

Solution

An invalid value has been transferred at the input i_ifParent.

At the input i_ifParent the parent logger point, an interface that is connected to the parent logger point or the global G_ifApplicationLogger interface has to be transferred.

ParentNotRegistered

Enumeration name:

ParentNotRegistered

Enumeration value:

8

Description:

The parent is not registered.

Cause

Solution

The parent logger point is not registered to the application logger yet.

The method RegisterLoggerPoint of the parent logger point has not been called before.

Ensure that the RegisterLoggerPoint method of the logger point that is given at the input i_ifParent has been called successfully.

ServiceNotRegistered

Enumeration name:

ServiceNotRegistered

Enumeration value:

17

Description:

The service is not registered.

Cause

Solution

The ApplicationLogger is not registered

The method G_ifApplicationlogger.RegisterCommunicationService has to be called successfully once before a message can be added to the ApplicationLogger.

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

3

Description:

A feedback value was invalid.

Cause

Solution

An error has been detected in the internal execution.

Contact your Schneider Electric service representative.