Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

IEC 61850 GOOSE clock helper




The goal of the block is to simplify creating models that contain GOOSE Timestamp attributes.
Its inputs are processed in order to provide the user with clock signals compatible with GOOSE clock inputs and a 64bit value encoded according to the IEC 61850 Timestamp data type. 

The block is compatible with both the IEC 61850 I/O interface and the Opal IEC61850 GOOSE Publisher sfunction.


This block does not have any parameters to configure.


sync: Input representing the state of synchronization. A value of 0 means that the clock is not synched and therefore the last byte of the gs_timestamp_attribute output will be 0xC4. Conversely, a value different from 0 means the clock is properly synched and that the last byte of gs_timestamp_attribute is set to 0xC0.

epoch: This input represents the current epoch time i.e. the number of seconds elapsed since 00:00:00 of January 1st, 1970 (UTC). This number is also known as Unix time, POSIX, or time. 

nanosec: Input representing the number of nanoseconds within the current second. This number should vary from 0 to 1e9 (exclusive) at each second.


gs_clock: This output is a bus:

  • index 0 contains the synchronization state and is a passthrough of the input sync.
  • index 1 contains the epoch time and is a passthrough of the input epoch.
  • index 2 contains the microseconds computed by dividing the input nanosec by 1000.

The gs_clock output bus matches the order of the IEC61850 I/O interface's clock connectables (Sync, Epoch, Microsec). These outputs can be linked to OpOutput blocks used by the I/O interface's clock connections.
However, attention must be paid to the Opal IEC61850 GOOSE Publisher sfunction. Its clock input bus expects the following order:

  • index 0: epoch
  • index 1: microseconds
  • index 2: state (i.e. the sync state)

Note that the order is shifted: the state is last whereas the gs_clock places it first. Please keep this in mind when placing the IEC 61850 GOOSE clock helper block in your model.

gs_timestamp_attribute: This output is a 64bit value compliant with GOOSE timestamp encoding. It takes all 3 inputs (sync, epoch and nanosec) to construct a value that could be used for any GOOSE messages containing attributes of type Timestamp. The use of this output is not obligatory. It does, however, guarantee that any timestamp attributes using it will match with the timestamp value in the header of the GOOSE message.

Characteristics and Limitations

Direct FeedthroughNo
Discrete sample timeNo
XHP supportYes
Work offlineYes

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323