TCP/IP Client

Creates a TCP client which connects to the TCP server at the port and address configured.

Note:

If you have already created and connected to a TCP/IP device (Client and/or Server), and then want to deploy the project to a new environment that has another TCP/IP device with different configuration options, the TCP/IP device will have a broken link icon beside it.

  1. To use the new device, from the Project Explorer, right-click on the TCP/IP device and select Reconnect.

  2. This will launch the Parameter Configuration dialog, which will allow you to reconfigure the settings accordingly (allowing you to retain any previously constructed scripts).

Control Description
Remote Address The IP Address of the TCP Server.
Port Specifies the port number over which to communicate; this TCP port must be open across all firewalls in order to work.
Packet Splitter

The method to use (and options) to automatically detect packet structure. Open the Packet Splitter Configuration to determine how to detect / split received TCP packets based on an expected format using start and/or end byte sequence to frame a message.

 

  • Option:
    • None: packets will remain in raw format with no changes made.

    • CRLFTerminator: Carriage Return / Line Feed characters will be at the end of each packet.

    • CRTerminator: Carriage Return character will be at the end of each packet

    • LFTerminator: Line Feed character will be at the end of each packet.

    • NullTerminator: Null character will be at the end of each packet.

    • Custom: The bytes defined by the "Start of Frame" property will be at the start of each packet. The bytes defined by the "End of Frame" property will be at the end of each packet.

  • Deframe Incoming: If checked, incoming packets will be buffered and the OnDataReceived event will only be triggered when a complete packet matching the format Option is found. If the Option is Custom and both Start of Frame and End of Frame have been defined, any data in the buffer found prior to the Start of Frame bytes will be discarded.
  • Frame Outgoing: If checked - outgoing packets will have bytes added to the start/end of each packet matching the format Option selected.
  • Start of Frame: Byte sequence that should be at the start of each packet. Expected format is hex bytes separated by hyphens. (For example, "01-12-0A-FF")
  • End of Frame: Byte sequence that should be at the end of each packet. Expected format is hex bytes separated by hyphens. (For example, "01-12-0A-FF")
Buffer Size

Specifies the size (minimum 1 byte, maximum 67108864 bytes; default = 8192) of the received data buffer for the TCP client device. The buffers are used to queue incoming messages. For example, if the Receive Data block is being used in a Task, and the block executes after the message was actually received, the message will be stored in the buffer, and processed the next time the block executes.

Note: This setting can be used in conjunction with the Receive Data block.
Number of Buffers

Specifies the number of buffers (minimum 1 buffer, maximum 65536 buffers; default = 10) for the received data for the TCP client device.

Note: This setting can be used in conjunction with the Receive Data block.
Interval (minutes) The number of minutes between Keep-Alive packets being sent to the server.