ProSoft Technology MVI71-GEC User Manual

Page 60

Advertising
background image

Reference

MVI71-GEC ♦ PLC 5 Platform

User Manual

Generic ASCII Ethernet Communication Module

Page 60 of 86

ProSoft Technology, Inc.

May 11, 2011

Handling Multiple Blocks
An important concept to understand about the MVI71-GEC module is how

multiple blocks are handled.
The buffer size supports 4096 bytes, but the module can only send 110 bytes at

each scan to the processor. For example, if a device sends a message that

contains 550 bytes to the module, it will break it down to five blocks of 110 bytes.

The first four blocks will set the number of characters parameter to -1, indicating

that each block is part of the same message. The last block will have the number

of characters parameter set to 110, indicating that there are no more blocks from

that message.
The same holds true for writing data from the processor to the module, in which

case you can write 118 bytes 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 since it does not check the

status of the number of characters parameter. Refer to the Reference chapter for

an example of ladder logic that handles messages containing multiple blocks.

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 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.

Advertising