XNET Read (State Time Current) VI
- Updated2025-10-07
- 3 minute(s) read
Reads the current interface timestamp using an XNET session. The time is returned as a LabVIEW absolute timestamp. local time communicating uses the local timescale. network time communicating and network synced are applicable only for an Ethernet interface.

Inputs/Outputs
session in
—
session in is the session to read. This session is selected from the LabVIEW project or returned from the XNET Create Session VI.
error in (no error)
—
The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.
session out
—
session out is the same as session in, provided for use with subsequent VIs.
local time current
—
local time current returns the current interface timestamp as a LabVIEW absolute time, using the local timescale. For CAN, FlexRay, and LIN, if the interface is not started when the XNET Read (State Time Current) VI is called, local time current returns an invalid time (0). For Ethernet, you can read current time prior to starting the interface.
error out
—
The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.
network time current
—
network time current Ethernet only. Returns the current time as a LabVIEW absolute time, using the network timescale. The network time current timestamp is captured simultaneously with the local time current timestamp. The network time current output is not applicable for CAN, FlexRay, and LIN and returns an invalid time (0).
network synced
—
network synced Ethernet only. Contains the value of the Synced property at the time that both timestamps are acquired, to specify whether the network time current timestamp is synchronized to the network (true) or not (false). The network synced output is not applicable for CAN, FlexRay, and LIN and returns a value of false. |
Description
You can use the XNET Read (State Time Current) VI with any XNET session mode. Because the time is associated with the interface, it can apply to multiple sessions.
The XNET Read (State Time Current) VI returns time as a LabVIEW absolute timestamp data type. The timestamp represents absolute time that the interface timebase source drives. You use the timebase source to timestamp frames the interface receives. For a CAN interface, you use the timebase source to schedule cyclic frame transmit.
The interface timebase source is not necessarily connected to the LabVIEW CPU clock, so this timestamp can drift relative to the LabVIEW time used for internally sourced timed loops and the LabVIEW Get Date/Time in Seconds VI.
For more information about the interface timebase source, refer to the XNET Connect Terminals VI.
session in
—
error in (no error)
—
session out
—
local time current
—
error out
—
network synced
—