The Simulink® Real-Time™ implementation of PTP enforces specific requirements and limitations.
PTP functionality is available only with a Speedgoat target computer. If you have not installed the Speedgoat library, attempting to build a real-time application with PTP causes a build error.
IEEE 1588 protocol support includes:
PTP over UDP is supported on Intel® 82574 Ethernet cards and Intel i210 Ethernet cards.
PTP over Ethernet is supported on Intel 82574 Ethernet cards.
To check that you have the required card, start your target computer. In the Command Window, type:
tg = slrt; getPCIInfo(tg, 'Ethernet')
Check that you see an entry like this entry:
Intel 82574L Bus 5, Slot 0, IRQ 10 Ethernet controller VendorID 0x8086, DeviceID 0x10d3, SubVendorID 0x15bd, SubDeviceID 0x100a Released in: R2010a Notes: Intel 8254x Gigabit Ethernet series
The PTP network card clock acts as PTP clock. Only one clock is allowed per node.
Run the model in
mode, not in
Freerun mode or driven
by an external interrupt. In the latter two cases, the PTP
message transmission intervals can violate the PTP
You can include only one PTP configuration block in a model. You can run only one real-time application on a target computer. If you have installed multiple PTP Ethernet cards on your target computer, you can use only one of them for PTP at a time. You can use the other PTP Ethernet cards for non-PTP purposes.
The PTP message transmission intervals (Announce interval, Sync interval, and Min delay or pdelay request interval) must be greater than the block sample time. Too small a message transmission interval causes a model update error.
Simulink Real-Time can transmit PTP messages only at a multiple of the block sample time. If a transmission interval is not a multiple of the block sample time, PTP transmits the messages at the nearest multiple to the specified transmission time. As a best practice, specify all transmission intervals as integral multiples of the block sample time.
The specification requires that a PTP node issue messages within ±30% of the message transmission intervals at least 90% of the time. To meet this requirement, specify message transmission intervals (Announce interval, Sync interval, and Min delay or pdelay request interval) at least three times the base sample time.
The following factors limit accuracy:
Network protocol stack delay fluctuation
Network technology component delay fluctuations (switches, routers)
Clock timestamp accuracy
Clock oscillator stability
Use components that minimize these factors. For example, you can use a transparent or boundary PTP clock to increase synchronization accuracy.
A transparent PTP clock tracks the amount of time a PTP message takes to go through the device. It passes that information to nodes receiving the message.
A boundary PTP clock has multiple PTP ports that can act as a master clock or a slave clock.
Some systems require a PTP time source that is traceable to an International Atomic Time (TAI) clock, such as a GPS signal. To support traceability, acquire a third-party grandmaster PTP clock that provides this capability. In that case, a Simulink Real-Time target computer running PTP acts only as a slave clock.
Simulink Real-Time supports only PTP version 2, as defined in IEEE® Std 1588-2008. If a Simulink Real-Time PTP node receives a PTP version 1 message as defined in IEEE Std 1588-2002, it ignores it.
The Simulink Real-Time implementation of PTP does not support the following functionality defined in IEEE Std 1588-2008:
PTP variance computation, as described in IEEE Std 1588-2008 Clause 7.6.3.
PTP nodes configured as one-step PTP clocks, as described in IEEE Std 1588-2008 Clause 3.1.21.
You can configure the master node as a two-step clock only, as described in IEEE Std 1588-2008 Clause 3.1.47.
PTP management messages, as described in IEEE Std 1588-2008 Clause 15.
A Simulink Real-Time PTP node cannot transmit a PTP management message. When a Simulink Real-Time PTP node receives a PTP management message, it ignores it.
PTP signaling messages, as described in IEEE Std 1588-2008 Clause 13.12.
A Simulink Real-Time PTP node cannot transmit a PTP signaling message. When a Simulink Real-Time PTP node receives a PTP signaling message, it ignores it.
Optional features, as described in IEEE Std 1588-2008 Clause 16 and Clause 17.