next up previous contents
Next: Events Up: Spear Timestamps and Events Previous: Spear Timestamps and Events   Contents

Timestamps

The Spear Timestamp is a 64-bit counter incremented at each 4kHz clock cycle (Frev/320). This counter is implemented in the ``Timestamp Master IOC'' and is reset to zero either manually or when the master IOC is powered up (but not when it is reset).

Spear Timestamp information is distributed on a wire and is available to other IOCs provided that they are equipped with a time-stamp VME module (aka. TSSM). The most important IOCs with timestamp capability are the MCORs and the BPMs (including photon BPMs).

Some (but not all) PVs on a timestamp-capable IOC are tagged with a Spear Timestamp in addition to the ordinary EPICS timestamp (wallclock time) which is associated with every PV and which can be retrieved along with the PV value over channel access.

The EPICS timestamp is in ``unix-style'', i.e., it consists of a `seconds' and a `nanoseconds' part. (LABCA passes EPICS timestamps as complex numbers with the seconds and nanoseconds in the real and imaginary part, respectively).

PVs that are tagged with a Spear timestamp carry the spear timestamp MODULO 1E9 in the nanoseconds part.

You can find out if a PV is tagged in this way by looking at the TSE field of the EPICS record the target PV is a field of (just append ``.TSE'' to the PV name). Tagged records have a TSE value of -2.

In addition to timestamping selected PVs, an IOC equipped with a TSSM (timestamp + sync module) also provides the running 64-bit timestamp as a dedicated PV: <ioc>:SpearTimestamp.


next up previous contents
Next: Events Up: Spear Timestamps and Events Previous: Spear Timestamps and Events   Contents
Till Straumann 2005-06-02