Documentation

IEEE 1588 Ethernet

Execute IEEE 1588 Precision Time Protocol

  • Library:
  • IEEE 1588

Description

IEEE 1588 Ethernet executes the PTP protocol, using raw Ethernet 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

Source MAC address in Ethernet transport protocol. From the list, select:

  • EEPROM — Allow the block to get the Ethernet card MAC address that is built into the Ethernet card. Use this option if you use separate Ethernet connections to transmit data and to synchronize PTP clocks.

  • Specify — Explicitly specify the source MAC address. Use this option if both of these conditions are true:

    • You use the same Ethernet connection to transmit data as you use to synchronize PTP clocks.

    • You do not know the built-in MAC address of the Ethernet card.

Dependency

Selecting Specify makes the Specify source MAC address parameter visible.

Enter the MAC address for the Ethernet card. Use the MAC address that is built into the Ethernet card or an arbitrary MAC address that is unique within the PTP network. Do not use one of the standard PTP multicast MAC addresses.

Dependency

To make this parameter visible, set Source MAC address to Specify.

Destination MAC address in Ethernet transport protocol. Select one of:

  • Standard PTP Multicast (01:1B:19:00:00:00, 01:80:C2:00:00:0E) — Default multicast MAC address assigned to the PTP protocol. If you select this option, the destination MAC addresses are:

    • 01:1B:19:00:00:00 for non-peer-delay measurement mechanism messages (Announce, Sync, Follow_up, Delay_Req, Delay_Resp)

    • 01:80:C2:00:00:00:0E for peer-delay measurement mechanism messages (Pdelay_Req, Pdelay_Resp, Pdelay_Resp_Follow_up)

  • Specify — Explicitly specify the destination MAC address.

You do not have to specify a source MAC address. The block uses the unique MAC address of the PTP Ethernet card.

Dependency

Selecting Specify makes the Specify destination MAC address parameter visible.

Specify a MAC address for the message destination. Use this option for Slave only nodes. Specify the MAC address of the master node Ethernet card. The master node uses the standard PTP multicast MAC address to transmit messages to all slave nodes.

Dependency

To make this parameter visible, set Destination MAC address 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?