Clock Module

The Clock Module provides the corrected local time required by the Scheduler module and Time of Use module.

Module icon

Overview

The module obtains the Coordinated Universal Time (UTC) from the device and converts it to local time, taking timezones and Daylight Savings into account.

NOTE: For the purposes of configuring the Clock Module, Coordinated Universal Time (UTC) can also be thought of as Greenwich Mean Time (GMT).

The Clock Module uses the UNIX time. This time format specifies the number of seconds that have elapsed since January 1, 1970, at 12:00 a.m. (UTC). The UNIX time format is required when entering time values into the module's Daylight Savings setup registers.

NOTE: The registers and settings available in this module depend on the device or node you are configuring, as well as its firmware and template versions. Not all registers or settings are available on all devices or the Virtual Processor, and labels may vary.

Inputs

Source

The Clock Module's Source input receives the Coordinated Universal Time (UTC) internally from the device or externally (see the Clock Source setup register). This input is fixed and cannot be linked to other output registers.

Setup registers

NOTE: The Clock Module in the Virtual Processor uses the host computer's clock to determine local time. Therefore, no setup registers are available except the DST Offset register, which is only used for regional variances.

There are format options available when editing some of the Clock Module's setup registers:

Format Description
Numeric Bounded A signed integer value that is contained within a range of possible values. Within the context of the Clock module, this register value is expressed in seconds.
Elapsed Interval A numeric value expressed in conventional time format (days, hours, minutes and seconds). This format is used when entering offset intervals such as timezone (TZ) or Daylight Savings time (DST).
Date/Time A numeric value expressed in conventional date and time format (year, month, day and time). This format is used when entering settings that require a specific date.

TZ Offset

This register is used to specify the time zone applicable to the area the device is in. The TZ Offset value is obtained by adding or subtracting from Greenwich Mean Time (GMT).

To determine the TZ Offset value, refer to your computer Control Panel. Inside the Control Panel is the Date/Time, which reports the settings currently in effect on your workstation. Timezone information is described as a number of hours added to or subtracted from GMT or UTC.

DST Start

Every DST Start register holds a start time for Daylight Savings Time for a one year span. DST Start must be specified in local time in the UNIX time format.

DST End

Every DST End register holds an end time for Daylight Savings Time for a one year span. DST End must be specified in local time in the UNIX time format.

DST Offset

The DST Offset setup register holds the Daylight Savings Time offset applicable to the device’s location. The Daylight Savings Time offset is the amount of time that the clock is moved forward when Daylight Savings Time begins. For example, the DST offset in North America is one hour.

If the DST Offset register is set to zero (0), the DST feature is disabled, and no warning messages are sent to the Event register when the DST period expires.

Time Sync Source

This register specifies the communications port used to receive time synchronization signals. Only signals received on the port selected will be used to synchronize the device’s internal clock. Time signals on other ports are ignored. If this register is not set to a valid communications port, no time synchronization will be performed.

Time Sync Type

This register specifies whether time synchronization signals are received in Universal time (UTC) or local time. By default, Time Sync Type is set to utc for server time synchronization. Set this register to local if time sync signals are received in local time (some DNP masters and GPS receivers use local time).

Clock Source

This register specifies the source used to adjust the period of your meter’s clock. If your device has a Clock Source setup register you can configure the Clock module to synchronize to the meter’s internal clock crystal (internal), or externally to the measured line frequency (line freq) or communications channel (comm). The meter’s clock period is fixed to the external source when the Clock Source setup register is set to line freq or comm, and the incoming time sync signal is valid. If your device does not have a Clock Source setup register, then synchronization defaults to the meter’s internal clock crystal.

Use GPS Quality Flag (Use Clock Source Quality Flag)

Set this register to use flag or ignore flag to determine the meter’s GPS or PTP time synchronization behavior.

  • use flag: the meter will only accept time syncs if the GPS or PTP Quality character value is true. For GPS time sync, a value of true indicates that the GPS has locked onto a satellite source. For PTP time sync, a value of true indicates that the meter is synchronized to a PTP master clock.
  • ignore flag: the meter will accept time syncs regardless of the GPS or PTP Quality character value.

Enable NTP Time Sync

Set this register to determine the meter’s NTP/SNTP time synchronization behavior.

  • no: NTP and SNTP time synchronization are disabled.
  • yes or sntp: SNTP time synchronization is enabled. yes applies to meters without NTP capabilities. sntp applies to meters with NTP capabilities.
  • ntp: NTP time synchronization is enabled.

NOTE: Setting this register to yes, sntp or ntp causes the meter to ignore all other time synchronization sources.

NTP Time Sync Interval

This register specifies the frequency at which the meter will attempt to time synchronize via SNTP. Changing this register’s value only applies to SNTP, not NTP. Values between 60 seconds and 1 year are acceptable.

Event Logging Threshold

This register is used for NTP and PTP time synchronization, and specifies the minimum time difference (in seconds) between the time source and your meter. If the difference in time exceeds this threshold and the meter time is adjusted, an event is logged. Configure the Event Logging Threshold to allow discrete time adjustments and prevent excessive event log entries.

PTP Domain Number

This register specifies the domain number. A PTP domain is defined as a logical grouping of clocks that synchronize to each other using the precision time protocol, but that are not necessarily synchronized to clocks in another domain. Domains facilitate multiple time distribution systems using the same network.

Output registers

UnivTime

This register contains the uncorrected UTC that is read from the ION device. The UTC is reported in the UNIX time format — the number of seconds elapsed since 12:00 A.M. January 1, 1970.

LocalTime

This register contains the local time, corrected to reflect the values input in the TZ Offset and DST Offset setup registers. The local time is reported in the UNIX time format — the number of seconds since 12:00 A.M. January 1, 1970.

NOTE: Linking UnivTime or LocalTime to the inputs of an Arithmetic module can yield unexpected results.

DSTFlag

This register turns on when Daylight Savings is in effect and turns off when Daylight Savings is not in effect.

Year

This numeric output register contains the year (local time) in calendar format (for example, 2012).

Month

This numeric output register contains the month (local time) in calendar format.

Day

This numeric output register contains the day (local time) in calendar format.

Hour

This numeric output register contains the hour (local time) in calendar format.

Minute

This numeric output register contains the minute (local time) in calendar format.

Second

This numeric output register contains the second (local time) in calendar format.

Day of week

This numeric output register contains the day of the week (local time) in calendar format. The format for Day of Week is as follows:

0 – Monday
1 – Tuesday
2 – Wednesday
3 – Thursday
4 – Friday
5 – Saturday
6 – Sunday

New Year

This pulse output register generates a pulse when a new year starts.

New Month

This pulse output register generates a pulse when a new month starts.

New Day

This pulse output register generates a pulse when a new day starts.

New Hour

This pulse output register generates a pulse when a new hour starts.

New Minute

This pulse output register generates a pulse when a new minute starts.

Startup (Virtual Processor only)

This pulse output register produces a single pulse when the Virtual Processor starts.

Event

All events are recorded in the Event register.

Possible events and their associated priority numbers are:

Event priority groupPriorityDescription
Setup Change 10 Input links, setup registers or labels have changed.
Information25 DST period Start or End has occurred.
Warning 30 DST Start and End times require reprogramming.

NOTE: The Clock module will issue a warning immediately after the last DST period expires, reminding you to program the next DST Start or End time. This warning, which is sent to the Event register, repeats every 24 days until the new DST Start or End is programmed. If DST is disabled (the DST Offset is set to zero), no warnings are issued.

The Event output register stores the following information for each ION event: time stamp, priority, cause, effect, and any values or conditions associated with the cause and effect.

Responses to special conditions

The following table summarizes how the module behaves under different conditions:

Condition Response of output registers
After the module is re-linked or its setup registers are changed. All output registers are NOT AVAILABLE.
When the device is started or powered-up (either the first time, or after a shut-down). All output registers are NOT AVAILABLE.

Detailed module operation

The Clock Module receives a Coordinated Universal Time and converts it to local time, based on the values input into the TZ Offset and DST Offset setup registers, and whether DST is enabled or not. The corrected local time in the LocalTime output register is automatically read by the Scheduler module (the modules are linked by default, but they can be unlinked).

The Clock Module provides both the UTC and the local time as numeric outputs that can be linked to other modules. Both values are in the UNIX time format.

In addition, the Clock Module provides local time as numeric outputs in calendar format: Year, Month, Day, Hours, Minutes, Seconds, and Day of Week. These outputs can be linked to other modules.

The Clock Module generates the following output register pulses: New Year, New Month, New Day, New Hour, and New Minute. These outputs can be linked to other modules.

The setting in the Time Sync Source register is used to implement time synchronization. This register must be set to the communications port that is used to receive time sync signals. If this register is not set to a valid communications port, no time synchronization will be performed.

Typical configurations

This table outlines some typical Clock settings and how they affect the meter’s time.

NOTE: Meter time is only adjusted by a time synchronization message if the difference between the meter time and the message time is greater than one second.

Clock Source Time Sync Source Enable NTP Time Sync Meter time

Internal

Any

No

Meter clock period defined internally.

Meter time adjusted by time synchronization message from selected protocol.

Ethernet

Yes, SNTP, NTP

Meter clock period defined internally.

Meter time adjusted by time synchronization message from SNTP or NTP server.

Line frequency

Any

No

Meter clock period defined by line frequency.

Meter time adjusted by time synchronization message.

Ethernet

Yes, SNTP, NTP

Meter clock period defined by line frequency.

Meter time adjusted by time synchronization message from SNTP/NTP server.

Communications port

Ethernet – PTP

No

Meter clock period defined by PTP

Meter time adjusted by time synchronization message from PTP master clock.

Communications port with GPS protocol or IRIG-B1

Meter clock period defined by GPS or IRIG-B.

Meter time adjusted by GPS or IRIG-B.

1 The physical input used for IRIG-B time synchronization depends on meter type, and may require connection to a dedicated IRIG-B port or an available onboard digital input. Refer to your device’s documentation for additional details.

SNTP/NTP Time Synchronization

To implement SNTP/NTP time synchronization, you must first specify the SNTP/NTP Server IP address in the Communications module. In the Clock module, make sure the Enable NTP Time Sync register is set to yes, sntp or ntp and the Time Sync Source setup register is set to ethernet. Time Sync Type must be set to utc for SNTP/NTP time synchronization to work. For SNTP enter the NTP Time Sync Interval value in seconds. For NTP you can configure the Event Logging Threshold to prevent excessive event log entries

PTP Time Synchronization

To implement PTP time synchronization, set the Time Sync Source setup register to ethernet-ptp and the Clock Source setup register to comm. You can configure the Event Logging Threshold to prevent excessive event log entries

GPS Time Synchronization

To implement GPS Time Synchronization, set the Clock Source setup register to comm. Then specify which serial communications port will receive time synchronization signals by setting the Time Sync Source setup register. Finally, specify the receiver that you want to use by selecting it from the Protocol setup register in the receiving port’s Communications module.

NOTE: Ensure that the Quality character of the GPS receiver is enabled. Contact your GPS vendor for instructions.

IRIG-B GPS Time Synchronization

To implement GPS Time Synchronization using IRIG-B, set the Clock Source setup register to comm and the Time Sync Source setup register to irig-b. The meter will accept input from any GPS receiver that outputs unmodulated IRIG-B time code data.