Parse the Contents of the HDR File

In order to parse the contents of the HDR file and fetch the fault event details, you must write a java script using the Scripting EM and this script must be present within the Scripts folder in the System Browser. You must also ensure that the Execution mode of the script is set to automatic in the Extended Operations tab.

The format of the content of the HDR file may vary across different IEC61850 devices. Accordingly, the parsing logic of the HDR file will also vary across these devices. Therefore, this logic is placed in a Java Script and not in the IEC61850 extension module. This enables the librarian to modify the parsing logic as required.

The Java script subscribes to the Value.info.Request property to get information such as the name and the content of the HDR file. The first line of the Value.info.Request property contains the name of the fault file. After parsing the contents of the HDR file, a response is generated and written by Java script to the Value.info.Response property.

While formulating a response in the Java script file, you must observe the following syntax. The response elements must be separated by a semicolon “;”.

[File name;Text group name;Index;Came time;Went time;Message text].

For example, FR_00408.HDR;TxG_IEC_AlertTexts;2;1489142059908;;Fault number = 00408.

Response Element

Description

Example

File name

Name of the fault file received from the Value.info.Request property . This file name is used to maintain context between request and response. This is a compulsory field.

FR_00408.HDR

Text group name

Name of the text group where you have specified the texts for fault causes. If this value is not specified then, the event text from the TxG_IEC61850Alert text group of the IEC61850 base library displays.

TxG_IEC_AlertTexts

Index

Corresponding text group index where the text for a particular fault cause is specified. This text is used as the event text in the alert. If this value is not specified in the response we take the event text from TxG_IEC61850Alert text group from the IEC61850 base library.

2

Came time

Date and Time of generation of the fault. The date and time value for Came Time must be specified in milliseconds as per the UTC time scale. This value can be left blank, if it is not present in the fault file.

1489142059908

Went time

Date and Time when the fault is handled. The date and time value for Went Time must be specified in milliseconds as per the UTC time scale. This value can be left blank, if it is not present in the fault file.

In the above example, Went time is not specified, hence this value is left blank.

Message text

Text to be displayed as an alert message when a fault is generated.

Fault number = 00408

In the HDR fault file, the Came time and Went time are specified in UTC date time format. For example,

UTC Date/Time

UTC date time in milliseconds since midnight Jan 1 1970

3/10/2017 10:34:19 A.M.

1489142059908

Different situations related to Event Went time and Event Came time

  • If the Event Came time is present but Event Went time is not present in the Java script response, then the IEC61850 extension module considers the Event Went time as equal to Event Came time.
  • If both, Event Came time and Event Went time are missing from the Java Script response, then the IEC61850 extension module substitutes the current time for Event Came and Event Went time.
  • If Event Came time is not present in the Java script response, but Event Went time is present, then the IEC61850 extension module considers the Event Came time as equal to Event Went time.