NI-XNET API for LabVIEW and C

XNET Stop.vi

  • Updated2023-11-11
  • 4 minute(s) read
 XNET Stop.vi

XNET Stop.vi

Purpose

Stops communication for the specified XNET session.

Format

Inputs

session in is the session to stop. This session is selected from the LabVIEW project or returned from the XNET Create Session VI.
scope describes the impact of this operation on the underlying state models for the session and its interface.
Normal (0) The session is stopped. If this is the last session stopped on the interface, the interface is also stopped. If any other sessions are running on the interface, this call is treated just like the Session Only scope, to avoid disruption of communication on the other sessions. For Ethernet interfaces, this is the only value of scope that is supported.

This is the default value for scope if it is unwired.

Session Only (1) The session is placed in the Stopped state (refer to State Models). If the interface was in the Started or Running state before this VI is called, the interface remains in that state and communication continues, but data from this session does not transfer. This scope generally is not necessary, as the Normal scope only stops the interface if there are no other running sessions. This operation sends the command to stop the session, but does not wait for the session to be stopped. It is ideal for a real-time application where performance is critical.
Interface Only (2) The underlying interface is placed in the Stopped state (refer to State Models). This prevents all communication on the bus, for all sessions. This allows you to modify certain properties that require the interface to be stopped (for example, CAN baud rate). All sessions remain in the Started state. To have multiple sessions stop at exactly the same time, first stop the interface with the Interface Only scope and then stop each session with either the Normal or Session Only scope.
Session Only Blocking (3) The session is placed in the Stopped state (refer to State Models). If the interface was in the Started or Running state before this VI is called, the interface remains in that state and communication continues, but data from this session does not transfer. This scope generally is not necessary, as the Normal scope stops the interface only if there are no other running sessions. This operation waits for the session to stop before completing.
error in is the error cluster input (refer to Error Handling).

Outputs

session out is the same as session in, for use with subsequent VIs.
error out is the error cluster output (refer to Error Handling).

Description

Because the session is stopped automatically when cleared (closed), this VI is optional.

For each physical interface, the NI-XNET hardware is divided into two logical units:

  • Sessions: You can create one or more sessions, each of which contains frames or signals to be transmitted (or received) on the bus.
  • Interface: The interface physically connects to the bus and transmits (or receives) data for the sessions.

You can stop each logical unit separately. When a session is stopped, all contained frames or signals are placed in a state where they are no longer ready to communicate. When the interface is stopped, it no longer takes data from sessions to communicate with other nodes on the bus. For a specification of the state models for the session and interface, refer to State Models.

Log in to get a better experience