Reference MVI46-GEC
♦
SLC Platform
Generic ASCII Ethernet Interface Module
ProSoft Technology, Inc.
Page 53 of 78
April 30, 2008
Refer to Installing and Configuring the Module for a full description of each
configuration parameter. When configuring the module from the ladder logic, text
values are not used for option selections. Instead, values are used. A value of
zero represents the text value of No. A non-zero value represents a text value of
Yes. After the module receives this block, it will build the two configuration files
and perform a reboot operation. The module will then utilize the new
configuration.
Handling Multiple Blocks
A very important concept is the understanding of how to handle multiple blocks.
The buffer size supports 8192 bytes (4096 words), but the module can handle
only 2048 bytes (1024 words). The module can only send 200 bytes (100 words)
at each scan to the processor. For example, if a device sends a message that
contains 1000 bytes to the module, it will break it down into 5 blocks of 200 bytes
(100 words). The first 4 blocks will set the number of characters parameter as -1,
indicating that each block is part of the same message. The last block will have
the number of characters set to 200 (100 words), indicating that there are no
more blocks from that message.
The concept is the same for writing data from the processor to the module except
that you can write up to 400 bytes (200 words) at a time to the module. The
module buffers all data until the moment when it receives a block that contains
the number of characters parameter set to >=0. In this case, it sends all data to
the client that is connected to the server, or the server connects to the client.
Important: The user 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 2 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.
The application layer defines when a message is finished. This is the reason why
the user should consider using some sort of control so the ladder could identify
different messages as actually part of one single message. This could be
accomplished either 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 initiated by a remote client and a server in the
module. The MVI46-GEC module contains five servers that listen on the user
assigned service ports waiting for a connection. When a remote client device
wishes to send data to the module, it must open a TCP/IP connection to the
module. Once 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.