Main Content

IEEE 1588 Read Parameter

Output Precision Time Protocol status parameter values such as target computer system time, calendar time, and delays

Since R2020b

  • IEEE 1588 Read Parameter block

Simulink Real-Time / PTP


The IEEE 1588 Read Parameter block reads the parameter that you select and send its value to the block output. The block label changes based on the parameter that you select.

You can use the IEEE 1588 Read Parameter block to read the target computer system time even without a PTPd process running.


Output Arguments

expand all

The current parameter to read.


expand all

Specify the parameter to read. Select one of:

  • System time (nanosecond) — Current SLRT system time number of nanoseconds, counting from the current epoch. The output is a uint64.

  • Calendar time (time_t) — Current SLRT calendar time in time_t int32 vector.

  • Offset from Client — Time offset in seconds. The output is a double.

  • Client to Server Delay — Time delay in seconds. The output is a double.

  • One Way Delay — Time delay in seconds. The output is a double.


The possible options for the parameter Offset from Client, Client to Server Delay, and One Way Delay will be removed in a future release.

The Calendar time (time_t) vector contains these components:

  • seconds after the minute – [0, 61] (until C99)[0, 60] (since C99)

  • minutes after the hour – [0, 59]

  • hours since midnight – [0, 23]

  • day of the month – [1, 31]

  • months since January – [0, 11]

  • years since 1900

  • days since Sunday – [0, 6]

  • days since January 1 – [0, 365]

  • Daylight Saving Time flag. The value is positive if DST is in effect, zero if not and negative if no information is available

Programmatic Use

Block Parameter: param

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

Programmatic Use

Block Parameter: sample_time

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b

See Also

External Websites