XNET IP Stack Create VI
- Updated2025-10-07
- 3 minute(s) read
Creates an XNET IP stack to use for TCP and/or UDP communication.

Inputs/Outputs
config
—
config specifies the configuration of the XNET IP Stack as a JSON string. For a list of features supported in the configuration, refer to Supported Features.
stack name
—
stack name is the name that uniquely identifies the stack. The syntax for this name allows some special characters, such as space ( ). Invalid characters include forward slash (/), backslash (\), period (.), and tab (\t). The name is not case sensitive. If you do not wire in a value to stack name, NI-XNET generates a name to ensure that each stack is unique.
error in
—
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.
stack out
—
stack out is the created XNET IP Stack. This I/O name is used with subsequent VIs for XNET IP Stack (for example, to obtain runtime info), XNET TCP Socket, and XNET UDP Socket.
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. |
Description
The XNET IP Stack enables you to create an implementation of the TCP/IP protocol suite for TCP and UDP communication, independent from the limitations of the IP stack native to the operating system.
To find examples of an XNET IP stack configuration, select Find Examples... from the LabVIEW Help menu and open Hardware Input and Output»Automotive Ethernet»IP Stack.
NI-XNET provides examples to create most common IP stack configurations, but more complex configurations are possible.
If the examples are not sufficiently advanced for your application, National Instruments installs documentation for the XNET IP Stack configuration string. The configuration string uses JSON format, and the formal documentation is provided as a JSON schema file. The JSON schema file is supported by a variety of online tools, and in addition to formally describing each field, it can be used to validate your customized JSON configuration string for correctness. To find the XNET IP Stack JSON schema, select Start»National Instruments»NI-XNET Documentation.
The XNET IP Stack is available for use by multiple top-level LabVIEW VIs in the current runtime. After creation, you can wire the stack name into an XNET VI that is called in a different top-level VI. Each usage of the stack name opens a refnum (driver reference) in LabVIEW as needed, and these refnums are closed appropriately as top-level VIs stop execution.
For more information on XNET IP Stacks, refer to IP Stack Subpalette.
config
—
error in
—
stack out
—
error out
—