FB_DiagnosticsManager - General Information

Overview

Type:

Function Block

Available as of:

1.1.2.0

Inherits from:

-

Implemented:

-

Access restriction:

PUBLIC

Task

Control module to coordinate several diagnostic sources Mode of operation and interface are bit-identical to FB_Diagnostics of EDESIGN. Diagnostic sources of PD_Template and EDESIGN together can be connected to an FB_DiagnosticsManager module from PD_Template or PD_EDesignCore.

Furthermore, FB_DiagnosticsManager establishes communication between the diagnostic sources for reading out data in the controller application and the user application "PacDrive Diagnostics”.

Description

Via a defined entry point in the memory (ST_DiagnosticsToApplicationMarkerArea), FB_DiagnosticsManager enables communication between PacDrive Diagnostics and the program. The module coordinates the output of all diagnostic sources via the control structure ST_DiagnosticsManagerToDiagSource.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE enables the POU, a falling edge TRUE -> FALSE disables the POU.

A deactivated POU does not execute any actions.

(see Schneider Electric standard template module infrastructure)

i_xDiagQuit

BOOL

A rising edge FALSE -> TRUE acknowledges pending exceptions of the POUs. Exceptions occurring during initialization can only be acknowledged by disabling the POUs.

i_pstDiagData

POINTER TO ST_DiagnosticsToApplicationMarkerArea

Memory address of the communication structure with PacDrive Diagnostics

Output

Data type

Description

q_xActive

BOOL

Outputs TRUE if the POU is enabled and FALSE if the POU has reached the idle state, e.g. after a falling edge at i_xEnable

(see Schneider Electric standard template module infrastructure)

q_xReady

BOOL

Outputs TRUE if the POU is ready to receive new commands and FALSE if the last command has not yet been completed

(see Schneider Electric standard template module infrastructure)

q_etDiag

GD.ET_Diag

Outputs the POU status according to the global library-independent diagnostic states

A value unequal to GD.ET_Diag.Ok corresponds to an error message.

(see Schneider Electric global diagnostics infrastructure)

q_etDiagExt

ET_DiagExt

Outputs the POU status as POU-specific diagnostic status defined in ECO.ET_DiagExt

A value unequal to ECO.ET_DiagExt.Ok corresponds to an error message.

(see Schneider Electric global diagnostics infrastructure)

q_sMsg

STRING(80)

outputs a string with further information on an occurred state readable to the user (see Schneider Electric global diagnostics infrastructure)

Input/Output

Data type

Description

iq_stComStructure

ST_DiagnosticsManagerToDiagSource

Communication structure between FB_DiagnosticsManager and diagnostic sources

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

DataFromDiagSourceRequested

18

Diagnostic data are being requested from DiagSources

OK

DiagnosticsConnectionInterrupted

15

The communication connection to Diagnostic program is lost.

OK

DiagSourceFinishedWriting

20

The writing of the file which includes the diagnostic data is finished.

OK

Disabled

22

Diagnostic message disabled

OK

EchoCommandProcessed

16

An echo of a command has been sent.

OK

ListOfDataElementsRequested

17

The list of data elements has been requested.

OK

ListOfDataElementsWritten

19

The list of data elements has been written

OK

WaitForDiagnosticsConnected

14

Waiting until communication to Diagnostics is established.

OK

WaitForDiagnosticsFileRead

21

Waiting until Diagnostics has read the file which contains the diagnostic data.

ControllerConditionInvalid

ControllerInvalid

6

The controller is invalid.

ExecutionAborted

ContinueGettingDataOfDiagSourceImpossible

127

Not possible to proceed reading out data of a DiagSource.

ExecutionAborted

DiagSourceIdInvalid

130

The identifier of a diag source is invalid.

ExecutionAborted

DiagSourceInException

157

A DiagSource is in exception state.

ExecutionAborted

NameOfDiagSourceNotUnique

137

There is already another object with this name.

ExecutionAborted

RamDiskFull

132

The read access memory disk is full

FileHandlingInvalid

CouldNotCloseFile

13

It was not possible to close a file via the file system.

FileHandlingInvalid

CouldNotDeleteFile

8

It was not possible to delete a file via the file system.

FileHandlingInvalid

CouldNotOpenFile

9

Unable to open the file.

FileHandlingInvalid

FileIdInvalid

2

The identifier of a file is invalid.

FileHandlingInvalid

FileNotOpen

11

A File is not opened yet.

InputParameterInvalid

CmdUnknown

57

Indeterminable command.

InputParameterInvalid

PointerDiagDataInvalid

7

The pointer to diagnostic data is invalid

LimitReached

MaxNumberOfDiagSourcesExceeded

135

The maximum number of DiagSources which can be registered is exceeded.

UnexpectedProgramBehavior

ContinueGettingDataOfDiagSourceImpossible

127

Not possible to proceed reading out data of a DiagSource.

UnexpectedProgramBehavior

StringTerminationNotFound

72

The termination signature, which signals the end of a string, was not found.

UnexpectedProgramBehavior

UnexpectedDiagSourceStateChange

134

The state of a DiagSource has changed unexpectedly

UnexpectedProgramBehavior

UnexpectedDiagSourceStateChange

134

The state of a DiagSource has changed unexpectedly

UnexpectedProgramBehavior

UnexpectedFeedback

10

An unintended error has been detected during execution.

CmdUnknown

Enumeration name:

CmdUnknown

Enumeration value:

57

Description:

Indeterminable command.

Issue

Cause

Solution

-

The command which was send by the Diagnostics program is not detected in this version of template library.

Use the newest version of template library

Use a version of Diagnostics which fits to the version of template library

ContinueGettingDataOfDiagSourceImpossible

Enumeration name:

ContinueGettingDataOfDiagSourceImpossible

Enumeration value:

127

Description:

Not possible to proceed reading out data of a DiagSource.

Issue

Cause

Solution

-

The order of command which is send by Diagnostics program is not correct

Use a version of Diagnostics which fits to the version of template library.

-

Data transfer disturbed

Verify the electromagnetic compatibility situation of the communication cables.

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, see q_sMsg output

CouldNotCloseFile

Enumeration name:

CouldNotCloseFile

Enumeration value:

13

Description:

It was not possible to close a file via the file system.

Issue

Cause

Solution

-

It was not possible to close the file which should be send to Diagnostics program.

Please inform your Schneider Electric representative about this detected error.

CouldNotDeleteFile

Enumeration name:

CouldNotDeleteFile

Enumeration value:

8

Description:

It was not possible to delete a file via the file system.

Issue

Cause

Solution

-

It was not possible to delete the file, after it was send to Diagnostics program

Please inform your Schneider Electric representative about this detected error.

CouldNotOpenFile

Enumeration name:

CouldNotOpenFile

Enumeration value:

9

Description:

Unable to open the file.

Issue

Cause

Solution

-

It was not possible to open a file which should be send to Diagnostics program, because there are already too many files open in the file handling system

Close some files in other program parts and try again.

-

The file handling system was not able to open a file

Please inform your Schneider Electric representative about this detected error.

DataFromDiagSourceRequested

Enumeration name:

DataFromDiagSourceRequested

Enumeration value:

18

Description:

Diagnostic data are being requested from DiagSources

The diagnostic data from external data sources (e.g. FB_AxisModuleDiagSource) are being collected.

DiagnosticsConnectionInterrupted

Enumeration name:

DiagnosticsConnectionInterrupted

Enumeration value:

15

Description:

The communication connection to Diagnostic program is lost.

The communication connection to Diagnostics program is disconnected, the trasmitting of diagnostic data is cancled.

DiagSourceFinishedWriting

Enumeration name:

DiagSourceFinishedWriting

Enumeration value:

20

Description:

The writing of the file which includes the diagnostic data is finished.

The file which holds the diagnostics data is written and can be received by the Diagnostics program.

DiagSourceIdInvalid

Enumeration name:

DiagSourceIdInvalid

Enumeration value:

130

Description:

The identifier of a diag source is invalid.

Issue

Cause

Solution

-

The Diagnostics program has ordered to send data of a not existing DiagSource.

Verify the electromagnetic compatibility situation of the communication cable.

Please inform your Schneider Electric representative about this detected error.

DiagSourceInException

Enumeration name:

DiagSourceInException

Enumeration value:

157

Description:

A DiagSource is in exception state.

Issue

Cause

Solution

-

An external DiagSource (e.g. FB_AxisModuleDiagSource) is in exception state.

Have a look at the diagnostic outputs of the exception source which is named at the output q_sMsg.

Disabled

Enumeration name:

Disabled

Enumeration value:

22

Description:

Diagnostic message disabled

The function block is deactivated, it executes no actions whatsoever. i_xEnable and q_xActive have the value FALSE.

EchoCommandProcessed

Enumeration name:

EchoCommandProcessed

Enumeration value:

16

Description:

An echo of a command has been sent.

An EchoCommand was received from the Diagnostics program, and the echo is send back.

FileIdInvalid

Enumeration name:

FileIdInvalid

Enumeration value:

2

Description:

The identifier of a file is invalid.

Issue

Cause

Solution

-

An internal execution error has been detected.

Please inform your Schneider Electric representative about this detected error.

FileNotOpen

Enumeration name:

FileNotOpen

Enumeration value:

11

Description:

A File is not opened yet.

Issue

Cause

Solution

-

An internal execution error has been detected.

Please inform your Schneider Electric representative about this detected error.

ListOfDataElementsRequested

Enumeration name:

ListOfDataElementsRequested

Enumeration value:

17

Description:

The list of data elements has been requested.

The list of data elements has been requested by Diagnostic program.

ListOfDataElementsWritten

Enumeration name:

ListOfDataElementsWritten

Enumeration value:

19

Description:

The list of data elements has been written

Diagnostic data written successfully.

MaxNumberOfDiagSourcesExceeded

Enumeration name:

MaxNumberOfDiagSourcesExceeded

Enumeration value:

135

Description:

The maximum number of DiagSources which can be registered is exceeded.

Issue

Cause

Solution

-

Too many external DiagSources (e.g. FB_AxisModuleDiagSource) are registered to the Diagnostics manager.

Increase the global parameter Gc_udiMaxNumberOfDiagSources to the maximum amount of DiagSources which should be registered to the Diagnostics manager.

NameOfDiagSourceNotUnique

Enumeration name:

NameOfDiagSourceNotUnique

Enumeration value:

137

Description:

There is already another object with this name.

Issue

Cause

Solution

-

At least two external DiagSources (e.g. FB_AxisModuleDiagSource) are registered to the Diagnostic manager with the same name.

Make sure the same type of DiagSource is used only once. The name of the duplicated diag source is given in q_sMsg output.

PointerDiagDataInvalid

Enumeration name:

PointerDiagDataInvalid

Enumeration value:

7

Description:

The pointer to diagnostic data is invalid

Issue

Cause

Solution

-

The input i_pstDiagData is set to zero

On the input i_pstDiagData, the address of the structure ST_DiagnosticsToApplicationMarkerArea has to be given, which has to be defined in the marker area of the controller.

RamDiskFull

Enumeration name:

RamDiskFull

Enumeration value:

132

Description:

The read access memory disk is full

Issue

Cause

Solution

-

There is not enough space on ram0 to write the diagnostics file which should be send to Diagnostic program.

Delete not used data on ram0.

StringTerminationNotFound

Enumeration name:

StringTerminationNotFound

Enumeration value:

72

Description:

The termination signature, which signals the end of a string, was not found.

Issue

Cause

Solution

-

An internal execution error has been detected.

Please inform your Schneider Electric representative about this detected error.

UnexpectedDiagSourceStateChange

Enumeration name:

UnexpectedDiagSourceStateChange

Enumeration value:

134

Description:

The state of a DiagSource has changed unexpectedly

Issue

Cause

Solution

-

An internal execution error has been detected.

Please inform your Schneider Electric representative about this detected error.

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

10

Description:

An unintended error has been detected during execution.

Issue

Cause

Solution

-

An internal execution error has been detected.

Please inform your Schneider Electric representative about this detected error.

WaitForDiagnosticsConnected

Enumeration name:

WaitForDiagnosticsConnected

Enumeration value:

14

Description:

Waiting until communication to Diagnostics is established.

Waiting till the communication connection to Diagnostic program is established.

WaitForDiagnosticsFileRead

Enumeration name:

WaitForDiagnosticsFileRead

Enumeration value:

21

Description:

Waiting until Diagnostics has read the file which contains the diagnostic data.

Waiting till the Diagnostic program has read the file which contains the diagnostic information.