Interface Transitions
- Updated2025-10-10
- 3 minute(s) read
Set Interface Property
While the interface is stopped, you can change interface-specific properties. These properties are in the Session Node category in LabVIEW or the Session Property Interface Properties (C). When more than one session exists for a given interface, the Interface category properties provide shared access to the interface configuration. For example, if you set an interface property using one session, then get that same property using a second session, the returned value reflects the change.
You cannot set properties of the interface while it is in Started or Communicating state. If there is an exception for a specific property, the property help states this.
Start Interface
You can request the interface start in two ways:
- XNET Read or XNET Write VI or the appropriate nxRead or nxWrite function method: The automatic start described for the Start Session transition uses a scope of Normal, which requests the interface and session start.
- XNET Start VI or nxStart method: If you call this function with scope of Normal or Interface Only, you request the interface start.
After you request the interface start, the actual transition depends on whether you have connected the interface start trigger. You connect the start trigger by calling the XNET Connect Terminals VI or nxConnectTerminals with a destination of Interface Start Trigger with a destination of Interface Start Trigger or by writing the XNET Session Interface:Source Terminal:Start Trigger property.
The Start Interface transition occurs as follows, based on the start trigger connection:
- Disconnected (default): Start Interface occurs as soon as it is requested (a Read, Write, or Start VI or function).
- Connected: Start Interface occurs when the connected source terminal transitions low-to-high (for example, pulses). Every Start Interface transition requires a new low-to-high transition, so if your application stops the interface (for example, Stop VI or nxStop), then restarts the interface, the connected source terminal must transition low-to-high again.
Stop Interface
Under normal conditions, the interface is stopped when the last session is stopped (or cleared). In other words, the interface communicates as long as at least one session is in use.
If a significant number of errors occur on the network, the communication controller may stop the interface on its own. For more information, refer to Comm State Not Communicating.
If your application calls XNET Stop VI or nxStop with scope of Interface Only, that immediately transitions the interface to the Stopped state. Use this feature with care, because it affects all sessions that use the interface and is not limited to the session passed to the stop method. In other words, using XNET Stop VI or nxStop with a scope of Interface Only stops communication by all sessions simultaneously.
Comm State Communicating
This transition occurs when the interface is integrated with the network.
For CAN, this occurs when communication enters Error Active or Error Passive state. For information about the specific CAN interface communication states, refer to XNET Read VI or nxReadState in the NI-XNET API reference.
For FlexRay, this occurs when communication enters one Normal Active or Normal Passive state. For information about the specific FlexRay interface communication states, refer to XNET Read VI or nxReadState in the NI-XNET API reference.
For LIN, this occurs when communication enters the Active state. The interface remains communicating while in the Active or Inactive state (not affected by bus activity). For more information about the specific LIN interface communication states, refer to XNET Read VI or nxReadState in the NI-XNET API reference..
Comm State Not Communicating
This transition occurs when the interface is no longer integrated with the network.
For CAN, this occurs when communication enters Bus Off or Idle state. For information about the specific CAN interface communication states, refer to XNET Read (State CAN Comm) VI or nxReadState in the NI-XNET API reference.
For FlexRay, this occurs when communication enters the Halt, Config, Default Config, or Ready state. For information about the specific FlexRay interface communication states, refer to XNET Read (State CAN Comm) VI or nxReadState in the NI-XNET API reference.
For LIN, this occurs when communication enters the Idle state. For more information about the specific LIN interface communication states, refer to XNET Read VI or nxReadState in the NI-XNET API reference.