Topic: DMD0224

Synchronizing the Clocks on Multiple Do-more Controllers


The TimeSync Configuration option allows the Ethernet-equipped Do-more controllers on a local network to automatically synchronize their internal real-time clocks. A typical network of Do-more controllers will have one configured as a TimeSync Server, one or more controllers configured as TimeSync Alternates, and the remaining controllers configured as TimeSync Clients. The TimeSync packet contains the current time from the TimeSync Server and the Update Interval so that TimeSync Clients and TimeSync Alternates will know when to expect the next TimeSync packet.

 

TimeSync packets are automatically sent by the TimeSync Server at the specified Update Interval. A TimeSync packet is also sent any time the real-time clock on the TimeSync Server is manually changed by the Do-more Designer Programmng Software, or changed by a NETTIME (SNTP Client) instruction in the controller.

 

Because the current Date and Time for a given controller is rendered from component values, TimeSync packets contain all of the information required for each controller to render a synchronized value. These packets contain the TimeSync Server's UTC time value, the Time Zone adjustment, and the $SummerTime setting. With these settings synchronized, the controllers will all render the same $LocalTime value for their clocks.

 

Note: This feature uses TCP/IP broadcast packets to synchronize the real-time clocks of the Clients and Alternates, which means that only controllers within the TimeSync Server's broadcast domain can be synchronized.

 


Configuring a Do-more controller to participate in a TimeSync network is done through the CPU Configuration page of the System Configuration utility. There are four possible options for the TimeSync Configuration feature:

 

Disabled - the TimeSync feature in this controller is disabled, the controller's real-time clock will not be synchronized by a TimeSync Server. This is the default configuration.

 

Client - this controller will process TimeSync messages that are sent from a TimeSync Server. Each time a Client receives a TimeSync message it will update it's real-time clock with the real-time clock information in the TimeSync packet, set its Status Bit ST23 ($TimeSynced) ON which indicates that the clocks have been synchronized, and begin timing down from the Update Interval so the Client will know when to expect the next TimeSync packet.

 

Server - this controller will generate TimeSync messages for other controllers on the network that are configured as Clients and Alternates. At each Update Interval or any time the Server's real-time clock is changed, a TimeSync Server will broadcast three TimeSync messages at five second intervals - three messages are sent to make sure that the Clients and Alternates receive at least one of the messages.

 

Alternate - this controller will normally function as a TimeSync Client but will promote itself to a TimeSync Server if there are no TimeSync packets received within the Update Interval. An Alternate will begin the process of promoting itself to a Server 15 seconds after the Update interval has expired.

 

The process of a TimeSync Alternate promoting itself to a TimeSync Server is as follows:

 

  1. The Alternate will broadcast a packet asking any TimeSync Servers on the network to immediately send a TimeSync packet.
     

  2. If a TimeSync packet is received the promotion process is stopped and the Alternate reverts back to a Client waiting on the next TimeSync packet.
     

  3. If no TimeSync packet is received, the Alternate will generate it's own TimeSync packet - using it's real-time clock and Update Interval values - and broadcast that packet on the network.

 

This TimeSync Alternate will continue to operate as a TimeSync Server until one of the following happens:
 

  1. A legitimate TimeSync Server connects to the network and begins sending TimeSync messages. At this point the Alternate will revert back to a Client and then process TimeSync packets as it normally would while operating as a Client.
     

  2. The Alternate controller is power-cycled. When the Alternate powers-up it will query the network for a TimeSync Server. If a Server responds the Alternate begins operating normally. If no Server responds the Alternate begins the process to once again promote itself to be a TimeSync Server.
     

  3. The Alternate controller undergoes a PGM -to- RUN transition. When the Alternate goes back into RUN mode it will query the network for a TimeSync Server. If a Server responds the Alternate begins operating normally. If no Server responds the Alternate begins the process to once again promote itself to be a TimeSync Server.

 

Update Interval - is used in the following three ways:
 

  • By a TimeSync Client - once a Client has it's time synchronized, it sets its own $TimeSynced status bit and will begin using the Update Interval value as a countdown timer to know when to expect the next TimeSync packet. If that packet is not received before the Update Interval expires the controller will reset it's status bit $TimeSynced (ST23) to indicate that the time is no longer synchronized.
     

  • By a TimeSync Alternate - once an Alternate has it's time synchronized, it sets it's own $TimeSynced status bit and will begin using the Update Interval value as a countdown timer to know when to expect the next TimeSync packet. If the next packet is not received before the Update Interval expires the Alternate will begin the process of promoting itself to a TimeSync Server.
     

  • By a TimeSync Server - designates the frequency that TimeSync packets are broadcast on the network.

 


See Also:

 


Copyright © Host Engineering, Inc. ALL RIGHTS RESERVED