Documentation

IEEE 1588 Read Parameter

Output Precision Time Protocol status parameter value

  • Library:
  • IEEE 1588

Description

Read the parameter that you select and send its value to the block output. The block output name changes based on the parameter that you select.

Ports

Output Arguments

expand all

Current number of nanoseconds, counting from the beginning of the epoch.

When Parameter to read is:

  • PTP time (nanosecond) — The output is a double.

  • PTP time (nanosecond vector) — The output is a uint vector.

    To compute the difference in nanoseconds between two vector time values, pass both time values to the Time Stamp Delta block. To convert a single time value to nanoseconds, pass one time value to a Time Stamp Delta block and ground the other input.

Dependency

When Parameter to read is PTP time (nanosecond) or PTP time (nanosecond vector), output Time is visible.

When you select the Time at block start check box, the value is measured at the beginning of block execution. When you clear the Time at block start check box, the value is measured at the end of block execution.

Current time in time-of-day format. The value is a vector of size 8, data type uint16, containing: year, month (1–12), day of week (0–6), day of month (0–31), hour (0–23), minute (0–59), second (0–59), and millisecond (0–999).

Dependency

When Parameter to read is PTP time (time-of-day), output Date is visible.

Last computed offset from master PTP clock node, in nanoseconds.

Dependency

When Parameter to read is Offset from Master, output Offset is visible.

Last computed mean path delay, in nanoseconds.

Dependency

When Parameter to read is Path delay, output PDelay is visible.

Current state of the protocol state machine. Returns one of:

  • 1 = INITIALIZING — Initializing data set and communication protocol

  • 2 = FAULTY — Occurrence of serious fault

  • 3 = DISABLED — Management message disables the node

  • 4 = LISTENING — Waiting for announce receipt timeout period to expire

  • 5 = PRE_MASTER — Intermediate state before moving to MASTER state after execution of Best Master Clock Algorithm (BMCA)

  • 6 = MASTER — Node is the master PTP clock node

  • 7 = PASSIVE — BCMA designates node as passive

  • 8 = UNCALIBRATED — Intermediate state before moving to SLAVE state after execution of BMCA

  • 9 = SLAVE — Node is a slave node

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

Dependency

When Parameter to read is Protocol state, output State is visible.

Parameters

expand all

Specify parameter to read and make corresponding output port visible. Select one of:

  • PTP time (nanosecond) — Reveals port Time and parameter Time at block start

  • PTP time (nanosecond vector) — Reveals port Time and parameter Time at block start

  • PTP time (time-of-day) — Reveals port Date

  • Offset from Master — Reveals port Offset

  • Path delay — Reveals port PDelay

  • Protocol state — Reveals port State

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

When you select this check box, the Time output contains the time at the beginning of block execution. When you clear this check box (the default), the Time output contains the time at the end of block execution.

Dependency

Setting Parameter to read to PTP time (nanosecond) makes this check box visible.

Introduced in R2015b

Was this topic helpful?