IBM CTI 2572 Network Card User Manual


 
CTI 2572 Installation and Operation Guide
45
Error recovery is a required component of any application utilizing network communications. The
example error recovery is simple, but typical of what you might do.
When executing the Start Network Server command, any error usually indicates an invalid command
block. The error must be manually corrected. Therefore, any errors that occur while attempting this
command are not logged nor is the error word cleared.
When performing other commands (such as memory transfer), you may encounter errors that are
caused by the network or the remote device with which you are attempting to communicate. For
example, the remote device may go off-line. In most cases, the practical error recovery is to log the
error and retry.
This example simply copies the last error to a V memory location and retries the command. The retry
will repeat until the command is successful. You may wish to modify the error logic to count the
number of errors/retries and to set an alarm when an error persists. You might also choose to store a
set of most recent errors in a table.
Rung 5 contains error recovery specific to TCP. If the connection to the remote device is lost (due to
network or remote device problems), the logic must re-establish the connection. This is
accomplished by comparing the command error word of the Memory Transfer command to the value
of 166. This is the error code that would be returned if the TCP connection were lost. When the
command error word is equal to 166, the logic will attempt to establish the connection again.
The logic recognizes three states:
1. The Network Server application has not been started (thus the IP address has not been set) and
WX1.3 is on. C1 is on; C12 and C13 are off.
2. The Network Server is active but a client network connection has not been established. Control
relay C12 is turned on in this state; C1 and C13 are off.
3. The network connection has been successfully established and data transfer can commence.
Control relay C13 is on in this state; C1 and C12 are off.
NOTE:
This example assumes you are starting the network server (and setting the IP address) using PLC
logic. This method is strongly recommended by CTI. If you choose to automatically start the network
server using network parameters in EEPROM, your logic will never see WX1.3 come on.
Therefore, you will need to modify the logic accordingly.
See the 2572 Installation and Operation Guide for information on startup methods.