NI-XNET API for LabVIEW and C

XNET Start.vi

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

XNET Start.vi

Purpose

Starts communication for the specified XNET session.

Format

Inputs

session in is the session to start. 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 started followed by starting the interface. This is equivalent to calling the XNET Start VI with the Session Only scope followed by calling the XNET Start VI with the Interface Only scope. 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 into the Started state (refer to State Models). If the interface is in the Stopped state before this VI runs, the interface remains in the Stopped state, and no communication occurs with the bus. To have multiple sessions start at exactly the same time, start each session with the Session Only scope. When you are ready for all sessions to start communicating on the associated interface, call the XNET Start VI with the Interface Only scope. Starting a previously started session is considered a no-op. This operation sends the command to start the session, but does not wait for the session to be started. It is ideal for a real-time application where performance is critical.
Interface Only (2) If the underlying interface is not previously started, the interface is placed into the Started state (refer to State Models). After the interface starts communicating, all previously started sessions can transfer data to and from the bus. Starting a previously started interface is considered a no-op.
Session Only Blocking (3) The session is placed into the Started state (refer to State Models). If the interface is in the Stopped state before this VI runs, the interface remains in the Stopped state, and no communication occurs with the bus. To have multiple sessions start at exactly the same time, start each session with the Session Only scope. When you are ready for all sessions to start communicating on the associated interface, call the XNET Start VI with the Interface Only scope. Starting a previously started session is considered a no-op. This operation waits for the session to start 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 started automatically by default, this VI is optional. This VI is for more advanced applications to start multiple sessions in a specific order. For more information about the automatic start feature, refer to the Auto Start? property.

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 start each logical unit separately. When a session is started, all contained frames or signals are placed in a state where they are ready to communicate. When the interface is started, it takes data from all started 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.

If an output session starts before you write data, or you read an input session before it receives a frame, default data is used. For more information, refer to the XNET Frame Default Payload and XNET Signal Default Value properties.

Log in to get a better experience