Monday, November 23, 2015

Question & Answer: What is the IEC 61850 EntryTime?

EntryTime is, e.g., used for IEC 61850 Log Entries to identify when a log entry has been stored.

Here is a Log Entry (encoded as an XML document):

<JournalEntry Entry="26" Day="11647" ms="19228670" Order="0">
  <Variable Tag="ServerIEDExample/CSWI0$ST$Pos$stVal">
    <BitString>00</BitString>
  </Variable>
  <Variable Tag="ServerIEDExample/CSWI0$ST$Pos$stVal|ReasonCode">
    <BitString>08</BitString>
  </Variable>
  <Variable Tag="ServerIEDExample/CSWI0$ST$Pos$q">
    <BitString>0000</BitString>
  </Variable>

The IEC 61850 EntryTime is mapped to MMS TimeOfDay:

The MMS TimeOfDay epoch began at 0 hours on 1 January 1984 (MJD 40 587). Times measured are designated in this standard as MMS TimeOfDay milli-seconds GMT and TimeOfDay days GMT, and represent offsets from the epoch.

How to translate the above time to date and time?

Day translates:
http://www.convertunits.com/dates/from/Jan+1,+1984/to/Nov+21,+2015

Date difference from Jan 1, 1984 to Nov 21, 2015
The total number of days between Sunday, January 1st, 1984 and Saturday, November 21st, 2015 is 11,647 days.

Milli-second translates:
https://www.unitjuggler.com/convert-time-from-ms-to-day.html?val=19228670

~=  5 hr. 20 min. 28 sec. 670 ms

Saturday, 21st November 2015 05:20:28:670

It is that easy.

By the way, the above log is generated by the SystemCorp Stack/API by simply adding three (3) lines in an CID File (in this case for the Smart Grid Gateway of HMS supporting Modbus, M-Bus, Profibus, Profinet, EtherNet/IP…):

<LogControl datSet="GooseDS" intgPd="0" logEna="true" logName="ServerIED" name="TestLog">
    <TrgOps dchg="true"/>
</LogControl>

Stay tuned for more features.

No comments: