--- title: "UDP and TCP Driver" --- # UDP and TCP Driver > Ignition’s UDP and TCP drivers allow communication with simple devices such as barcode scanners and scales. These drivers are not general-purpose PLC drivers, but lightweight tools for raw stream data over TCP or UDP. They connect to one or more ports on a given IP address and receive any incoming data (ASCII characters, for example) as tag values. Both drivers can act as passive listeners, meaning they do not write or make requests unless configured to do so. This is ideal for devices that continually push data without expecting a poll/response. The TCP driver supports an optional writeback capability, exposing writable tags to send data back to the device. :::note These drivers do not parse industrial protocols, but instead handle stream-oriented or delimited data only. ::: ## Structure in the Address Space When you connect with these drivers, the device appears under the Devices folder of the OPC UA server with the configured name. Inside the device node, you will see: * One folder per configured port * Inside each port folder, one tag for the entire message * Plus one tag for each configured field For example, a device with four fields would expose five tags in its port folder. See the [Address Browsing](#address-browsing) section for information on browsing these tags. ## Connecting to a Device Instead of connecting directly to a PLC, these drivers connect to ports. The connected device must be configured to send data to those ports. You can configure multiple ports for a single device connection. These drivers require the OPC UA module to be installed and enabled. If the module is missing or disabled, the devices will fault with a “Missing Dependency” error on the **Platform** > **System** > **Modules** page. ## TCP Driver The TCP driver can act as a passive receiver, or allow writes to be sent back to the device through tags if writeback is enabled. ### Connecting to a TCP Device 1. On the Gateway, go to **Connections** > **Devices** > **Connections**. ![](../devices-connections.png) 2. Click **Create Device Connection +**. 3. Select **TCP Driver** from the list and click **Next**. ![](select-tcp.png) 4. On the **Configure Device** screen, enter the required fields: * **Name**: The desired name for the device (e.g., TCP) * **Port(s)**: The TCP port(s) to connect to, comma-separated. (e.g., 12345) * **Address**: The IP address of the device (e.g., 10.20.3.45) ![](tcp-settings.png) 5. Click **Create Device Connection**. The device will be listed now on the Connections page. The status will initially show Disconnected, but will move to a Connected state. ![](tcp-connected.png) ### TCP Device Settings #### General | Name | Description | |------|-------------| | Name | A user-defined name for the device. This name appears in OPC item paths and the Devices list. Name must begin with an underscore or a letter, and cannot include special characters. | | Description | Optional description to help identify the device. | | Enabled | When selected, the device is active and available for use. | #### Connectivity | Name | Description | |------|-------------| | Port(s) | Specifies the TCP port or ports to connect to. Multiple ports can be entered as a comma-separated list. | | Address | Specifies the IP address of the device to connect to. | | Local Address | Defines the local IP address to bind from, if needed. | | Connect Timeout | Sets the time, in milliseconds, to wait for a socket connection. A value of zero disables the timeout. | | Inactivity Timeout | Sets the time, in milliseconds, of allowed inactivity before the connection is reset. A value of zero disables the timeout. | #### Message | Name | Description | |------|-------------| | Message Delimiter Type | Defines how message boundaries are determined. Options include Packet Based, Character Based, or Fixed Size. | | Message Delimiter | Specifies the characters or length used to identify the end of a message, depending on the delimiter type. | | Field Count | Sets the expected number of fields in each message. | | Field Delimiter | Specifies the characters used to separate fields within a message. | #### Writing | Name | Description | |------|-------------| | Writeback Enabled | Enables writable tags to send data to the device. | | Writeback Message Delimiter | Specifies the delimiter that signals the end of a message during writeback operations. | | Write Timeout | Sets the time, in milliseconds, to wait for a write to complete. The default value is 5000. | ### TCP Tags | Name | Description | |------|-------------| | Last Receive Time | Displays the timestamp of the last message received from the device. | | Message | Shows the string representation of the last received message. | | MessageBytes | Displays the binary (byte-level) representation of the last received message. | | Writable | Allows writing of string data to the device if writeback is enabled. | | WritableBytes | Allows writing of binary data to the device if writeback is enabled. | ## UDP Driver The UDP driver is a passive listener only. It does not send data back to the device and is well-suited for broadcast-type devices. ### Connecting to a UDP Device 1. On the Gateway, go to **Connections** > **Devices** > **Connections**. ![](../devices-connections.png) 2. Click **Create Device Connection +**. 3. Select **UDP Driver** from the list and click **Next**. ![](select-udp.png) 4. On the **Configure Device** screen, enter the required fields: * **Name**: The desired name for the device (e.g., UDP) * **Port(s)**: The UDP port(s) to connect to, comma-separated. (e.g., 12345) * **Address**: The IP address of the device (e.g., 0.0.0.0 to listen on all interfaces) ![](udp-settings.png) 5. Click **Create Device Connection**. The device will be listed now on the Connections page. The status will initially show Disconnected, but will move to a Connected state. ![](udp-connected.png) ### UDP Device Settings #### General | Name | Description | |------|-------------| | Name | A user-defined name for the device. This name appears in OPC item paths and the Devices list. Name must begin with an underscore or a letter, and cannot include special characters. | | Description | Optional description to help identify the device. | | Enabled | When selected, the device is active and available for use. | #### Connectivity | Name | Description | |------|-------------| | Address | Specifies the IP address that the device will listen on. | | Port(s) | Defines the UDP port or ports to listen on. Multiple ports can be entered as a comma-separated list. | #### Message | Name | Description | |------|-------------| | Message Delimiter Type | Defines how message boundaries are determined. Options include Packet Based, Character Based, or Fixed Size. | | Message Delimiter | Specifies the characters or length used to identify the end of a message, depending on the delimiter type. | | Field Count | Sets the expected number of fields in each message. | | Field Delimiter | Specifies the characters used to separate fields within a message. | #### UDP | Name | Description | |------|-------------| | Message Buffer Size | Sets the size of the message buffer, in bytes. | | Multicast | Enables multicast mode for receiving messages. | ### UDP Tags | Name | Description | |------|-------------| | Last Receive Time | Displays the timestamp of the last message received from the device. | | Message | Shows the string representation of the last received message. | | MessageBytes | Displays the binary (byte-level) representation of the last received message. | ## Address Browsing Once your TCP or UDP connection is set up, you can start browsing the driver for data points. The example below uses the TCP driver and assumes you have already connected to a valid port and IP address. For instructions on setting up a TCP driver connection, see [Connecting to a TCP Device](#connecting-to-a-tcp-device). 1. In your Tag Browser, click on the **Add** ![Tag Browser Add Icon](tag-browser-add-icon.png) icon, then click on **Browse Devices...** ![Browse Devices Icon](browse-devices-icon.png). The Connected Devices popup window will open. ![Address Browsing Step 1](address-browsing-step-1.png) 2. Navigate to the tag you want to import. In this example, since we want to add the Message in port 5000, we'll go through **Ignition OPC UA Server** > **Devices** > **[TCP Driver]** > **5000** > **Message**. ![Address Browsing Step 2](address-browsing-step-2.png) 3. Select the tag or folder to import and add it to your Tag Provider by clicking on the Add ![Connected Devices Window Add Icon](connected-devices-add-icon.png) icon. This will stage the tag for when you are ready to import, in case you want to add any other tags or folders. ![Address Browsing Step 3](address-browsing-step-3.png) 4. Once you have added the tags and folders you want, click **OK** to add them to your Tag Browser. ![Address Browsing Step 4](address-browsing-step-4.png) Your data is now available to use in Ignition. ## Message Delimiters Some devices use control characters to signal the end of a message. Tag values update no faster than the scan class they use. If messages arrive more quickly than the scan class, Ignition will drop them. Typical reliable scan rates are 100–200 ms, though TCP can theoretically scan down to 25 ms, and UDP depends heavily on network conditions. You can specify these in the driver settings. | Characters | Description | |------------|-------------| | \t | Represents a tab character. | | \b | Represents a backspace character. | | \n | Represents a newline character. | | \r | Represents a carriage return character. | | \f | Represents a form feed character. | :::tip If tags show unexpected bad quality, check your delimiter and field count settings. Mismatches will result in BAD_CONFIG_ERROR. :::