Contents
MVI69-GEC ♦ CompactLogix or MicroLogix Platform
User Manual
Page 70 of 86
ProSoft Technology, Inc.
February 18, 2014
The same holds true for writing data from the processor to the module, in which case you
can write 118 bytes (59 words) each time to the module. The module buffers all the data
until it receives a block that has the number of characters parameter set to >=0. In this case,
it sends all data to the client connected to that server.
The ladder logic should handle multiple blocks. The main example ladder logic is very
simple and will only handle up to 110 bytes (55 words) because it does not check the status
of the number of characters parameter.
Important:
You should be aware that messages are usually broken down into smaller frames by the IP layer in a
specific LAN or WAN according to the Maximum Transmit Unit (MTU) of the network.
For example, a message that contains 2000 bytes (1000 words) can be broken down into
two messages by the IP layer in the network (after it is sent to the module). The same issue
is applied when a client sends data to the server; although a client sends a single message
to the module, it could be broken down into smaller fragments before it gets to the module.
In this case, the module would interpret it as two different messages.
It is the application layer’s responsibility to define when a message is finished. Therefore,
you should consider using some kind of control that allows the ladder to identify different
messages as part of a single message. This could be accomplished by using a specific
character at the end of each message or by using a fixed length for each message.
Network Data Transfer
In order for data to be transferred between the module and another device, a TCP/IP
connection must be made between a client and a server on the module. The MVI69-GEC
module contains five servers that listen on the user assigned service ports waiting for a
connection. When a client devices wishes to send data to the module, it must open a
TCP/IP connection to the module. After the connection is established, either device can
send and receive data. When either device is finished with the connection, the connection
must be closed. This operation can be initiated from either end device.
The MVI69-GEC module servers and clients are configured to handle their TCP/IP session
independently. The user parameter Connection Timeout is utilized to determine the amount
of time a connection can remain idle before the server will close the connection. If the
parameter is set to 0, the server will not perform the timeout logic and the socket will never
be closed by the server on an idle condition. If this feature is utilized, it can prevent
connections that may be lost and were not properly closed. After the connection is
established, the ladder logic should verify that the client had not been communicating for
some time and close the connection.
Each server on the module is assigned its own server port number. This does not mean that
two or more servers cannot share the same port number. In fact this might be desirable in
some instances. It is up to the ladder logic to keep track of each message and to insure that
a request/response transaction is associated with the correct connection. Information to
keep track of each connection is passed in each input image. The status data set provides
the IP address and TCP port address for the connection on each server. Each message
transferred between the module and the processor has a server index word. This word
associates the message with a server, which is associated with a connection to a specific IP
address and TCP port address. Therefore, each connection is specified to the processor by
the server index. The following illustration shows a snapshot of the modules status data: