Using Synchronized Replay with the NI-XNET
- Updated2025-10-10
- 3 minute(s) read
You can synchronize replay across multiple interfaces that use the same or different protocols.
To synchronize frame replay across multiple devices, complete the following steps:
-
Create a frame output stream session on each device to synchronize.
Use this session to configure each device in the following steps.
-
Synchronize all devices for the desired replay timescale.
Option Description Network time Ensure that network time within all devices is synchronized to a master time source. Note Ethernet devices allow you to remove the phase offset of Network Time via the Interface:Ethernet:Time Sync:Adjust Network Time property.Local time Ensure that all devices are synchronized to the local chassis time. Note If all devices are within the same PXI chassis, local time is automatically frequency-locked, but there will be a phase offset. You can Future Time Trigger and Timestamp Triggers on Ethernet devices to measure the phase offset.Note CAN and LIN devices do not use time to synchronize, so time synchronization is not required, per se, but their local time counters must be frequency-locked across all devices. This happens automatically as long as they are in the same PXI chassis.All devices allow you to remove the phase offset of local time via the Interface:Adjust Local Time property.
-
Based on the protocols you are synchronizing, configure all Ethernet sessions
to use the same timescale for replay with the Interface:Ethernet:Output
Stream Timescale property.
- Ethernet only: Use network time or local time as desired.
- Ethernet with any CAN or LIN: Only local time is supported.
-
If synchronizing CAN or LIN with Ethernet, do the following:
- Configure the CAN/LIN sessions to use a start trigger that is asserted from a future time event on one of the Ethernet devices.
- For the CAN/LIN sessions, use Connect Terminals to connect a PXI trigger to the start trigger.
- With one of the Ethernet sessions, use Connect Terminals to connect time trigger to the same PXI trigger used on the CAN/LIN devices.
- Set the Auto Start? property to False on all sessions.
-
On the Ethernet sessions, write a future time wait frame into each session with
an absolute timestamp, representing a common moment in time across all devices
from the view of each individual device, that is the start time when the session
should start outputting data, depending on the presence of phase offset between
devices.
- If no phase offset present: Timestamp must be the same for every session.
- If phase offset present: Timestamp must compensate for measured phase offset.
-
Write the respective CAN/LIN/Ethernet data frames to be replayed into each
session.
Note The absolute time of each frame timestamp is not important, but the relative timing is. Hardware uses the timing rules described in Handling Timestamps for the relative timing of each data frame.
- If synchronizing CAN or LIN with Ethernet, use the same Ethernet session from step 4 to pulse the time trigger at the correct start time using Future Time Trigger; use the same start time value that you used for the future time wait frame in step 6 on the same session.
-
Start all sessions with
Start.
Note The sessions must be started before the start time occurs.
Hardware waits until the start time occurs and then immediately starts outputting the subsequent data frames.
Related Information
- Timestamps in in Replay Mode
Understand how the driver software reconciles frame timestamps when your interface is in a replay mode.
- Timescales
Timescale refers to the concept of a clock that measures the progression of time. uses three distinct timescales for a variety of features, including timestamping of received frames, timestamping of trigger signals, waveform sampling, and timestamped transmission.
- Frame Output Stream Mode
A frame output stream session transmits an arbitrary sequence of frame values using a single stream. The frame values are not limited to a single frame—they can transmit any frame.