UDP Open Function
- Updated2026-07-27
- 2 minute(s) read
Opens a UDP socket on the port or service name.
Close the socket with the UDP Close function. Use the UDP Multicast Open VI instead of this function to open connections capable of reading, writing, or reading and writing data to or from UDP Multicast sockets. Use the UDP Write function to query the NI Service Locator for the port number registered with the service name.

Inputs/Outputs
net address
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
port
—
service name
—
timeout ms (25000)
—
error in (no error)
—
timeout ms specifies the time, in milliseconds, that the function waits before the function completes and returns an error. The default value is 25,000 ms or 25 seconds. A value of -1 indicates to wait indefinitely.
connection ID
—
port
—
connection ID is a network connection refnum that uniquely identifies the UDP socket. Use this value to refer to this socket in subsequent VI calls.
error out
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Data Communication\Protocols\UDP\Simple UDP\Simple UDP.lvproj
- labview\examples\Data Communication\Protocols\UDP\UDP Named Service\UDP Named Service.lvproj
net address
—
port
—
service name
—
timeout ms (25000)
—
error in (no error)
—
connection ID
—
port
—
error out
—