14
Klicken Sie auf das Symbol um ein Bild einzufügen Klicken Sie auf das Symbol um ein Bild einzufügen Klicken Sie auf das Symbol um ein Bild einzufügen Klicken Sie auf das Symbol um ein Bild einzufügen Klicken Sie auf das Symbol um ein Bild einzufügen Klicken Sie auf das Symbol um ein Bild einzufügen Precision Time Protocol IEEE1588 Klaus Mählert Product Management Group Manager Konstanz – April 17, 2012

Precision Time Protocol IEEE 1588

Embed Size (px)

Citation preview

Page 1: Precision Time Protocol IEEE 1588

Klicken Sie auf das Symbol um ein Bild einzufügenKlicken Sie auf das Symbol um ein Bild einzufügenKlicken Sie auf das Symbol um ein Bild einzufügenKlicken Sie auf das Symbol um ein Bild einzufügenKlicken Sie auf das Symbol um ein Bild einzufügenKlicken Sie auf das Symbol um ein Bild einzufügen

Precision Time Protocol IEEE1588

Klaus Mählert

Product Management Group Manager

Konstanz – April 17, 2012

Page 2: Precision Time Protocol IEEE 1588

Precision Time Protocol IEEE1588 with AVT GigE cameras

Presentation by courtesy of Allied Vision Technologies

Page 3: Precision Time Protocol IEEE 1588

What is Precision Time Protocol?

• An IEEE1588 networking standard

• Used to manage clock synchronization of multiple devices across an Ethernet network

• Cameras can utilize the same time base and relevance for the timestamp

• Adopted by machine vision with GigE Vision 2.0

Page 4: Precision Time Protocol IEEE 1588

Competing clock synchronization schemes

• Network time protocol (NTP)• Offers poor accuracy ~ 10 ms• Low cost, most common clock synchronization scheme in networking

• Global Positioning System (GPS) • Provides excellent precision ~ ns• An expensive component to incorporate into every

device• Precision Time Protocol (PTP)

• Provides excellent precision ~ µs• Low cost - can be incorporated into cameras using a

firmware change and without additional hardware

Page 5: Precision Time Protocol IEEE 1588

TimeStampValue represents camera clock

• The heart beat of the camera• Drives signal timing including exposure start time• Attached to every frame and used by the driver to

calculate frame rate

Page 6: Precision Time Protocol IEEE 1588

Enabling PTP Synchronization

• PtpMode = Off• TimeStampValue is not synchronized with any other device.

• PtpMode = Master• All Slave devices synchronize their clock to this camera's

TimeStampValue.

• PtpMode = Slave• TimeStampValue is altered to align with a Master

TimeStampValue.

• PtpMode = Auto• Uses the IEEE1588 best master clock algorithm to determine

which device is master.

Page 7: Precision Time Protocol IEEE 1588

Monitoring PTP Synchronization

• PtpStatus = Off (Read only)• The device PtpMode is set to off.

• PtpStatus = Master (Read only)• The device is configured and working as Master PTP device.

• PtpStatus = Error (Read only)• The slave device is in the process of synchronizing with the master.

• PtpStatus = Slave (Read only)• The device is acting as a slave and synchronized to within several

microseconds of the master.

Page 8: Precision Time Protocol IEEE 1588

How is PTP synchronization realized?

• Master PTP clock transmits a “Sync” telegram using multicast messaging.

• Slave PTP clock cameras receive multicast and calculate time difference between its own clock and the Master PTP clock.

• Clock synchronization, using follow up and delay messages is used to align the Slave PTP device clocks to the Master PTP clock.

Page 9: Precision Time Protocol IEEE 1588

How is PTP synchronization realized?

• Once a Slave clock is within 2 µs of the master, its PtpStatus is changed from Error to Slave.

• If the timestamps are 2 seconds or more apart, the Slave camera overwrites its own timestamp with the Master camera timestamp.

Page 10: Precision Time Protocol IEEE 1588

Implementing a scheduled software triggerThe PtpTriggerTime attribute is used to define a future TimeStampValue for start of exposure.

1. Achieve clock synchronization. Set PtpMode = Master, Slave or Auto.

2. Set camera FrameRate, FrameStartTriggerMode, and AcquisitionMode as desired. Start an acquisition stream using AcquisitionStart.

3. Determine the current camera TimeStampValue using TimeStampValueLatch.

4. Set PtpTriggerTime to a value which sufficiently exceeds the current camera TimeStampValue. Allow several seconds for the camera to receive PtpTriggerTime

Page 11: Precision Time Protocol IEEE 1588

PtpTriggerTime Notes

• Setting PtpTriggerTime will suspend all frame triggers in a camera’s current AcquisitionStart stream while PtpTriggerTime >= TimeStampValue

• When TimeStampValue increases to reach PtpTriggerTime, frame triggers resume

• To implement a scheduled (future) software trigger set

PtpTriggerTime = TimeStampValue + = Time required to upload

PtpTriggerTime to the camera

The PtpTriggerTime event does not start a new acquisition stream, it simply resumes frame triggers on an existing stream.

Page 12: Precision Time Protocol IEEE 1588

Suggested PTP Camera Networks

• A switch is required for implementing a PTP network

• Cannot currently implement PTP synchronization across multiple adapters

• LAG between host and switch has been tested and shown poor results

• 10 GigE Uplink ports are being tested and have shown good initial results

Page 13: Precision Time Protocol IEEE 1588

Comparing TimeStampValues between camera events and frames

• Camera EventControls allow the host to receive a TimeStampValue for a selected event, e.g. EventSyncIn1Rise. Likewise all frames returned from camera have a TimeStampValue associated with them.

• Comparison of these TimeStampValues can give valuable information, and with PTP synchronization, allow for a common time base between cameras and event sensors.

Page 14: Precision Time Protocol IEEE 1588

Thank you for your attention.

STEMMER IMAGING GmbHGutenbergstr. 9-1382178 PuchheimGermany

Phone: +49 89 80902-236Fax: +49 89 80902-116

[email protected]

Your contact: Klaus Mählert