Documentation

IEEE 1588 Real-Time UDP

Execute IEEE 1588 Precision Time Protocol

  • Library:
  • IEEE 1588

Description

IEEE 1588 Real-Time UDP executes the PTP protocol, using UDP to send and receive the protocol messages. The block communicates with the corresponding blocks on the other target computers, determines the time offset that synchronizes them, and adjusts the time offset.

Parameters

expand all

General

From the list, select a unique number to identify the Ethernet board.

Enter the PCI bus number for the Ethernet card.

Enter the PCI slot number for the Ethernet card.

Enter the PCI function number for the Ethernet card.

Enter the base sample time or a multiple of the base sample time.

Network Parameters

IP address of the Ethernet board, or node, carrying the PTP clock.

The addresses 0.0.0.0 and 255.255.255.255 are invalid IP addresses.

Mask that designates a logical subdivision of a network.

The gateway must be within the network.

To indicate that a gateway is not being used, enter 0.0.0.0 (the default). The address 255.255.255.255 is an invalid gateway IP address.

IP address in UDP Receive blocks. The default value (0.0.0.0) specifies that the node is to receive all packets sent to the ports assigned to PTP messages (ports 319 and 320).

Use a specific value for one-to-one communication. If the node is a master PTP clock node, use a specific value only if exactly one slave is connected to the master clock node.

The address 255.255.255.255 is an invalid IP address.

IP address in UDP Transmit blocks. Specifies the IP address of the other PTP computers or devices to which to send the PTP packets. Select one of:

  • Standard PTP Multicast (224:0:1:129, 224:0:0:107) (default) — Default standard multicast IP address assigned to PTP. If you select this option, the PTP packets are broadcast to all computers listening on the PTP ports (ports 319 and 320). The destination IP addresses are:

    • 224.0.1.129 for non-peer-delay measurement mechanism messages (Announce, Sync, Follow_up, Delay_Req, Delay_Resp)

    • 224.0.0.107 for peer-delay measurement mechanism messages (Pdelay_Req, Pdelay_Resp, Pdelay_Resp_Follow_up)

  • Specify — Explicitly specify the destination IP address.

Dependency

Selecting Specify makes the Specify destination IP address parameter visible.

The default value (255.255.255.255) specifies that the node is to broadcast the packets to all listening nodes of the network. Use a specific value for one-to-one communication. If the node is a master PTP clock node, use a specific value only if exactly one slave is connected to the master clock node.

Dependency

To make this parameter visible, set Destination IP address of transmit packets to Specify.

Clock Parameters

Specify the origin point of the PTP timescale. Select one of:

  • PTP (1970-01-01) — Precision Time Protocol standard epoch, starting January 1, 1970.

  • GPS (1980-06-01) — Global Positioning System standard epoch, starting June 1, 1980.

  • NTP (1900-01-01) — Network Time Protocol standard epoch, starting January 1, 1900.

  • Specify — Explicitly specify the timescale epoch.

Dependency

Selecting Specify makes the Arbitrary timescale epoch (yyyy mm dd hh) parameter visible.

Specify the origin point for the PTP timescale, in year, month, day, and hour.

Dependency

To make this parameter visible, set Timescale (epoch) to Specify.

Specify the method of measuring link delays. Configure all PTP network nodes to use the same link delay measurement mechanism.

For more information, see IEEE® Std Clause 7.5.4.

When you select this check box, you cannot allocate the PTP Ethernet card that this block represents as a master PTP clock.

In Slave only mode, the values of the advanced parameters (Priority 1, Clock class, Clock accuracy, and Priority 2) are set to their highest values. When the parameters have these settings, all of the other nodes must have the same configuration. If a node has a different configuration, the Best Master Clock Algorithm (BMCA) cannot allocate the node as best master clock. If the BMCA selects a Slave only node as best clock, the node remains in the LISTENING state.

For more information, see IEEE Std 1588-2008.

Dependency

Selecting this check box makes advanced configuration parameters visible: Domain number, Current UTC offset, Priority 1, Clock class, Clock accuracy, and Priority 2.

Specify the domain number of the PTP network to which the node belongs.

A Simulink® Real-Time™ PTP node can belong to only one PTP domain at a given time. If the node receives a PTP message with a different domain number, it ignores it. For more information, see IEEE Std Clause 7.1.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

The current UTC offset, in seconds.

If you specify a nonzero value, that value is considered valid. The UTCOffsetValid flag is set to true. Otherwise, the flag is set to false. For more information, see IEEE Std 1588-2008 Clause 7.2.3.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

Specify an integer value encoding the priority of the PTP node in the network. When the value is 0, the node has the highest priority. When it is 255, the node has the lowest priority.

To assess the quality of two PTP clocks, the Best Master Clock Algorithm compares the following parameters, in order:

  1. Priority 1

  2. Clock class

  3. Clock accuracy

  4. Priority 2

For each parameter, the algorithm selects the clock with the smaller value as the best clock. If all four parameters are equal for both clocks, the algorithm compares the MAC addresses of the nodes.

For more information, see IEEE Std 1588-2008 Clause 7.6.2.2.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

Specify a nonreserved integer value. If Clock class is less than 128, the node cannot enter the SLAVE state. If Clock class is less than 128 and the node is not selected as the best clock, the node enters the PASSIVE state.

If you specify a reserved integer value, the block produces an error during model update. For more information, see IEEE Std 1588-2008 Clause 7.6.2.4. For a list of reserved and nonreserved Clock class values, see IEEE Std 1588-2008 Table 5.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

Specify a nonreserved integer value. For more information, see IEEE Std 1588-2008 Clause 7.6.2.5. For a list of reserved and nonreserved Clock accuracy values, see IEEE Std 1588-2008 Table 6.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

Specify secondary priority of PTP node. When the value is 0, the node has the highest priority. When it is 255, the node has the lowest priority.

For more information, see IEEE Std 1588-2008 Clause 7.6.2.3.

Dependency

To make this parameter visible, select the Show advanced configuration parameters check box.

Time Intervals

The period, in seconds, of an Announce message transmitted by a node in master state.

For more information, see IEEE Std 1588-2008 Clause 9.5.8.

The period, in seconds, of a Sync message transmitted by a node in master state.

For more information, see IEEE Std 1588-2008 Clause 9.5.9.

Period of delay request message or of peer-delay request message transmitted by a node in the slave state. When the delay measurement mechanism is Request-response, the block transmits delay request messages. When the mechanism is Peer-delay, it transmits peer-delay request messages.

For more information, see IEEE Std 1588-2008 Clauses 9.5.11 and 9.5.13.

Specifies the number of announce intervals a node not in the master state has to wait without receiving an announce message. After the timeout passes, the node enters the master state.

For more information, see IEEE Std 1588-2008 Clause 9.2.6.11.

Introduced in R2015b

Was this topic helpful?