Use "Channel Re-Tasking" To Avoid Using Up Tcp Connections; Client Channels Tcp Resource Management - GE RX3i User Manual

Pacsystems
Hide thumbs Also See for RX3i:
Table of Contents

Advertisement

If the logic for issuing COMMREQs is constructed so it does the following, all available TCP connections can
quickly be used up:
The number of repetitions (Word 9 in an Establish Read or Write Channel COMMREQ) is set to 1, and
A new COMMREQ is issued repeatedly and immediately upon completion of the prior one.

Use "Channel Re-Tasking" To Avoid Using Up TCP Connections

TCP connections can be used up if each successive COMMREQ is directed to the same target device (same IP
address). In this case, it is better to establish a channel with the target device once, leave it active, then re-task
the channel, even if data transfers take place infrequently. This method will use only one TCP connection.
An additional advantage of re-tasking is that the time and network traffic required to create a channel and its
associated TCP connection are not incurred each time a data transfer is required.
The disadvantages to re-tasking are:
While the TCP connection is open, it is unavailable to the rest of your application, and
The active TCP connection uses up network bandwidth because the active TCP connection generates a
small amount of ongoing periodic network traffic.
How To Re-Task a Channel
1.
For Establish Read/Write Channel Commands, set the number of repetitions (COMMREQ Word 9) to 2
and set the read/write period (COMMREQ Words 10 and 11) to be longer than the expected time
between transfers. For example, if you expect to transfer data about once per minute, set the
read/write period to about two minutes. This will cause a TCP connection to be created and held open
for two minutes.
2.
Set up the ladder program to:
a.
Issue the first COMMREQ and wait for the first transfer to complete, which will be indicated when
the COMMREQ Status (CRS) word is changed to 1.
b.
Then before the read/write period expires (at which time the second and final transfer is sent and
the TCP connection is dropped), issue the next COMMREQ with the same parameters as specified
in step 1. This will "re-task" the channel to use the existing TCP connection instead of opening a
new one, and will send another data transfer restarting the timer for the read/write period.
Repeat step 2B for each successive data transfer desired.

Client Channels TCP Resource Management

There is a period of time that the OS Network stack hangs on to the TCP resources associated with a
connection after it is closed. It applies to the initiator of the close, which is almost always the client side. This
time is referred to as the "TCP Linger Period". Once the TCP Linger Period expires (60 seconds in the current OS
implementation), the TCP resources are released. Application developers using client channels need to be
aware of this behavior when designing their logic. There are a finite number of TCP resources allocated to
client channels, and if channel connections are brought up and down so fast that these resources are depleted,
then the application may have to wait until a TCP resource frees up in order to establish another client channel
(a COMMREQ Status of 0xA890 is returned if no TCP resources are currently available; application should wait
and retry again).
GFK-2224Q
In Certain Conditions TCP Connections Can Be Totally Consumed
January 2017
Chapter 7. Programming SRTP Channel Commands
Caution
131

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rx7i

Table of Contents