Communicating Over UDP
An In-Sight vision system can be configured to act as a UDP server or client device, opening a connection between the vision system and another UDP device for sharing data over the network.
User Datagram Protocol (UDP), an alternative to TCP, is a connectionless communication transport method that offers a limited amount of service when messages are exchanged over the Internet Protocol. Unlike TCP, UDP does not acknowledge or guarantee delivery, nor does it provide for sequencing packets.
To configure a vision system as a client or server device for UDP service:
- In the Communications group box, press the Add Device button.
- From the Device Setup group box, select Other from the Device drop-down list.
- Select UDP from the Protocol drop-down list.
- Press the OK button.
- Now you will need to configure the UDP Settings tab, and select an input string (if needed) and output string (if needed).
ModeDefines whether or not the In-Sight vision system will be configured as a client or a server (Client, Client w/ Response, Server or Server w/ Response; default = Client). In the UDP communication paradigm, a client is a system that accesses a remote service on another computer system (the server) over a network, and a server is a networked device that handles requests for data from another networked device.
- Client: The vision system will transmit data to the specified server.
- Client w/ Response: The vision system will transmit data to the specified server, then wait, based on the time-limit set in the Timeout parameter, for a response message from the server.
- Server: The vision system will receive data as the specified server.
- Server w/ Response: The vision system will receive data as the specified server, then send a response message back to the client device.
Server Host NameDefines the host name or IP address of the UDP server. If the Modeparameter is set to Server or Server w/ Response, this parameter will be disabled.
PortDefines the communication port number between the UDP server and UDP device. If the In-Sight vision system is being configured as a Server and a Server Host Name has been entered, the Port parameter assigns the port number to this device. If the vision system is being configured as a Client, the port number must be the same as the port number of the UDP server.
TimeoutDefines the amount of time (100 to 15000; default = 1000), in milliseconds, that is required to receive a response from the server device when a message is sent from the client device.
Note: The Timeout parameter is only enabled when the Mode parameter is set to Client w/ Response.
The Input String tab allows you to define a string that is input from another device into an EasyBuilder tool's string input, such as a Match String parameter of a Read ID Codes, Read 1D Code, Read 1D Codes (1-20), Read 2D Code, Read 2D Codes (1-20), Read Postal Code or Read Text Identification Tool in the Inspect Part step.
Input NameFrom the drop-down menu, select the EasyBuilder job or tool property that will be input.
Note: To input a text string from an external device, such as a PLC or PC, for use with an Identification Tool, please see the topic: Inputting Data for Identification Tools.
The Format Output String tab allows you to define the data that is sent to the UDP server, when the Mode parameter is configured as a Client, Client w/ Response or Server w/ Response.
- From the Format Output String tab, click the Format String button, which will launch the FormatString dialog, where you will be able to add, customize and modify the order of the data sent.
- Within the FormatString dialog, press the Add button, which will launch the Select Output Data dialog.
- The Select Output Data dialogs contain the data from any Location or Inspection Tools that were added to your job and the overall job results. From the dialog, select the appropriate data that you want to be sent from the In-Sight sensor, and press the OK button.
- After you have selected your data in the Select Output Data dialog, the FormatString dialog will reappear.
- You can modify the strings and/or rearrange the order of the data that will be sent by selecting the data from the list and clicking either the Up or Down buttons to set your desired order. Once you have finalized your string modifications, press the OK button.
- Now that the string has been formatted, the output data will be sent after the sensor completes its job execution.