NI-XNET API for LabVIEW and C

XNET Read (State Time Start).vi

  • Updated2023-11-11
  • 3 minute(s) read
 XNET Read (State Time Start).vi

XNET Read (State Time Start).vi

Purpose

Reads the time when the session interface started its integration.

Format

Inputs

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 is the error cluster input (refer to Error Handling).

Outputs

session out is the same as session in, provided for use with subsequent VIs.
local time start returns the interface start time as a LabVIEW absolute time, using the local timescale.

If the interface is not started when the XNET Read (State Time Start) VI is called, local time start returns an invalid time (0).

network time start Ethernet only. Returns the interface start time as a LabVIEW absolute time, using the network timescale. The network time start timestamp is captured simultaneously with the local time start timestamp.

The network time start output is not applicable for CAN, FlexRay, and LIN and returns an invalid time (0).

This output is optional.

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.

This output is optional.

error out is the error cluster output (refer to Error Handling).

Description

You can use the XNET Read (State Time Start) 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 Start) VI returns time as a LabVIEW absolute timestamp data type.

Your application typically starts the interface simply by calling an XNET Read VI or XNET Write VI, because the XNET Session Auto Start? property is true by default. If you set Auto Start? to false, you start the interface using the XNET Start VI. If you use the XNET Connect Terminals VI to import a start trigger for the interface, all sessions for that interface wait for the trigger to occur before starting the interface.

Once the interface starts, this VI captures and returns the time. Unless you connect a start trigger, this time generally is known, so this VI may not be useful.

After the XNET interface starts, the communication controller begins to integrate with ECUs in the network. After this integration is complete, the time is captured and available using the XNET Read (State Time Comm) VI. That time often is useful for FlexRay, because it indicates the time when true communication began.

Log in to get a better experience