简体   繁体   中英

Synchronizing the timestamp of multiple Allied Vision GenICam cameras through PTP

I am developing a system with multiple industrial Allied Vision Mako-cameras. I need those cameras to be synchronized, for which Allied Vision recommends the PTP protocol. Therefore, I have a time-server which acts as a PTP master clock. The cameras are connected to that server through an Ethernet switch. Unfortunately, that switch is not PTP-enabled, meaning that it introduces latency when delivering the PTP packets. This causes the cameras to remain in PtpStatus == Uncalibrated .

As far as I understand the Allied Vision GigE-Features manual, PTP causes the camera's timestamp to be synchronized across all cameras, ie GevTimestampValue should be the same on all cameras at any given time. However, during an experiment where I filmed a clock with multiple cameras, I observed that the timestamp delivered by two different cameras was about 187511041595600 ticks off (approx. 187511 seconds) while the clock visible in the frame shows the actual time difference of approx.0.04 seconds.

Therefore, my questions are:

  • Did I understand the PTP interface of Allied Vision correctly?
  • Is maybe PtpStatus == Uncalibrated causing this to not work?

After some investigative work, I found the cause and will share my findings here, in case someone else is stuck in the same situation:

Short answer:

  • The cause of my issues is indeed my switch. I replaced it with a different switch temporarily which fixed the problem.
  • I did understand PTP correctly, however, the cameras need to be at least once in PtpStatus == Slave in order to be in sync. If they loose synchronization later, they will revert to Uncalibrated and remain somewhat in sync, but if they never were in PtpStatus == Slave , they are not yet synchronized. This caused the timestamps to be way off.

Long answer: I configured my switch to mirror the ports to which the time server and the camera are connected to my laptop. With WireShark, I was then able to investigate the PTP traffic and found out, that the Sync and Delay_Req packets get delivered, which causes the cameras to transition from Listening to Uncalibrated (My time server does not send Follow_Up ). However, the Delay_Resp (which is sent by the time server) gets dropped by the switch. It thus seems that my switch is misconfigured in some way, letting those other multicast packets pass while dropping Delay_Resp .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM