ProSoft Technology MVI71-GEC User Manual
Page 63
MVI71-GEC ♦ PLC 5 Platform
Reference
Generic ASCII Ethernet Communication Module
User Manual
ProSoft Technology, Inc.
Page 63 of 86
May 11, 2011
After the processor has processed the read block, it should prepare a write block
for the module. The format of this block (built in the write file) is shown in the
following table.
Word
Offset
Description
0
Block Sequence Number (Read block number as set by module)
Transmit
Data
1
Server Number for data to transmit. If the word contains a value of -1, no
transmit data is present. If the word contains a value from 0 to max
number of servers -1, the block contains data to send to the specified
server in the module..
2
Number of characters to transmit to server. Each block can transmit up to
400 bytes of data. If this word contains a value of -1, the block contains
400 bytes of data and more blocks of data are to follow. When the
module received the last block containing a positive value representing
the number of bytes in the block, the server will transmit the data to the
client.
3 to 202
Data to transmit on specified server.
203 to 245 Reserved for future use
246
Server Control Word
247
Module Control Word
Words 246 and 247 control the server and module as discussed in the previous
section. If data is to be transmitted to a server, word 1 should be set to the
appropriate server index value. If a value of -1 is placed in the word, no transmit
data will be processed by the module (null transmit block). The number of bytes
in the message to transmit must be placed in word 2 and the data placed in the
block starting at word 3. After the block is constructed, the ladder logic should
copy the last block sequence number received in the last read block into word 0
of the write block. This will trigger the module to process the new write data block
and to construct a new read block.
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 MVI71-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.