T850_TO_T870 and T870_TO_T850 Elementary Functions for the 140 NOP 850 00
(Original Document)
Introduction
The 140 NOP 850 00 module is a device that sends and receives data timestamped according to the IEC60870 protocol. Some Quantum ERT devices send and receive data timestamped according to the IEC 61870 protocol.
To enable data transfer between devices that support different timestamp structures, you can use the following elementary functions in your program logic:
T850_TO_T870 Representation in FBD
The following graphic depicts the T850_TO_T870 function:
T850_TO_T870 Parameters:
Parameter
Type
Description
Input parameters:
IN
TIME_850_FORMAT
The IEC61850 timestamp format.
Output parameters:
OUT
TIME_870_FORMAT
The IEC 60870 timestamp format.
T870_TO_T850 Representation in FBD
The following graphic depicts the T870_TO_T850 function:
T870_TO_T850 Parameters:
Parameter
Type
Description
Input parameters:
IN
TIME_870_FORMAT
The IEC 60870 timestamp format.
Output parameters:
OUT
TIME_850_FORMAT
The IEC61850 timestamp format.
Data Type Structure - TIME_850_FORMAT
Element
Type
Description
Seconds
DWORD
Seconds since 01-01-1970.
NOTE: Only dates after January 01, 2000 are valid.
Ms_Quality
DWORD
Milliseconds in IEC61850 format in low three bytes; highest byte manages quality.
Data Type Structure - TIME_870_FORMAT
Element
Type
Description
ms
WORD
From 0...59999 ms
min
BYTE
Numerical minute reference: 0...59. The highest bit indicates time validity:
  • 0 = valid time
  • 1 = invalid time
hour
BYTE
Numerical hour reference: 0...23
NOTE: SU (summertime) is not supported.
day
BYTE
Numerical day reference: 1...31.
NOTE: Day of week is not supported.
mon
BYTE
Numerical month reference: 1...12.
year
BYTE
Numerical year reference: 0...99.
reserved
BYTE
<Reserved>