TCP Client

Configure the Client

  1. On the Program Navigation tree, click PLC Communications>Physical>CPU Ethernet>TCP Client.

  2. Click Add New. You can click the fields to edit them.

When you add a TCP Client, UniLogic automatically creates a supporting Global operand struct.

Name

Data Type

Description

Comments

Is Initialized

Bit

Socket is initialized.

 

Is Connected

Bit

ON when connection exists.

 

Port Number

UINT32

Displays the number of the Client Port, as defined in the CPU Ethernet<TCP Client settings.

 

Server Port Number

UINT32

This is the port set in the TCP Client Connect function

 

Server IP Address

UINT32

This is the IP set in the TCP Client Connect function

 

Socket State

UINT32

Status Messages:

  • Socket Not Initialized= 0x01

  • Connecting= 0x02

  • Connection Established= 0x03

  • Closed= 0x04

 

TX Success Counter

UINT32 array

The number of packets sent successfully  per connection

 

TX Fail Counter

UINT32 array

The number packets that failed to be sent per connection

 

RX Success Counter

UINT32 array

The number of packets successfully received  per connection

 

RX Drop Length Error

UINT32 array

Dropped packets per connection, due to insufficient buffer size (user buffer)

 

RX Drop Length Error

UINT32 array

Dropped packets per connection, due to insufficient buffer size (user buffer)

 

RX Drop Length Unhandled Packet Counter

UINT32

Dropped packets