TOC PREV NEXT INDEX

Put your logo here!


4.10 TIME HANDLING

4.10.1 Using the Time System

LCUs are provided with accurate timing through the time reference system. This works in two modes:

· with a TIM interface to the time bus. The time bus distributes the time to each LCU connected to it. In this mode the time on the LCU is accurate at hardware level to 10 ms. The accuracy at software level depends on the interrupt latency of your LCU, interrupt priority, task priority and other activity on your LCU.
· if the LCU has no TIM interface it uses the ntp protocol to synchronize to the system time. This gives an accuracy at millisecond level. If ntp is not installed, set the time of your LCU by hand (command TIMSUTC to lccServer) or use the function tooSetLcuTime to set the LCU time to the time of the boot workstation.

In both modes there are a number of functions to synchronize application software to the UTC time:

· run an interrupt routine synchronized to UTC. This is only possible with a TIM interface
· give a semaphore to a task synchronized to UTC
· send a message to a task synchronized to UTC
· schedule a task synchronized to UTC

The scheduling in any of the modes listed can be done:

· once immediately
· periodically starting immediately
· once at a given UTC
· periodically starting at a given UTC
· on one or every change of second
· on one or every change of 10 millisecond

When using the TIM board, there are six timers available. Some of them are reserved for special purposes:

· timer 0 is used for interrupt routines synchronized to UTC
· timer 1 is used by the function timerSleep
· timer 2 is used by sampling
· timer 5 is reserved as system clock

Timers 3 and 4 are free for use. If the function timerSleep is not used, timer 1 is also available.

If sampling is not used, timer 2 is also available. If timer 5 is not used as system clock, it is also available. By default it is not to used as system clock.

The timer number to use for timerSleep and sampling can be configured, see the LCC User Manual [2].

4.10.2 Synchronization of LCUs

Two LCUs can be synchronized using the time system. If you want to synchronize two processes on two different LCUs, start them at the same absolute UTC using the time system. The action has of course to be initiated in due time, so that none of the LCUs misses the event, e.g. tries to schedule the process when the UTC has passed.

Processes running periodically can also synchronize to the change of second or 10 millisecond.

4.10.3 Synchronization of Hardware

When using the TIM module hardware can be synchronized directly from the timers. This is done through an output signal from each timer which can be used to trigger the hardware.

The timers can also be synchronized to the hardware through gating signals connected to the timers allowing starting or stopping timers on hardware events.

For more information see also the VLT TRS Time Interface Module Technical Manual, [20].

4.10.4 Synchronization of Workstations.

Workstations can be synchronised using the ntp protocol. If an accurate Time Server is available on the LAN, it can be used to synchronise all Workstations. If no Time Server is available, a Workstation can act as master on which all others will be aligned. LCUs not equipped with a TIM board shall be synchronised, using ntp, with their master Workstation.



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX