ProSoft Technology MVI71-GEC User Manual

Page 58

Advertising
background image

Reference

MVI71-GEC ♦ PLC 5 Platform

User Manual

Generic ASCII Ethernet Communication Module

Page 58 of 86

ProSoft Technology, Inc.

May 11, 2011

Write Block
These blocks of data transfer information from the PLC processor to the module.

The structure of the BTW blocks used to transfer this data 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 maximum

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
118 bytes of data. If this word contains a value of -1, the block contains 118

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 61

118 bytes of data to transmit on specified server.

62

Server Control Word

63

Module Control Word

In Word Offset 0 the Block Sequence Number is the value set by the module

received on the last read block transfer through the BTR on the module. The

ladder logic should copy this value from word 0 of the BTR image to word 0 of

BTW image in the ladder logic. This is the last operation performed when

constructing the write block. The module’s program will trigger the process write

block function when a new value is recognized in word 0 of the BTW image.
Word 1 of the block defines the server index that should receive the message. If

the word is set to a value of -1, there is no data in the message. A value of 0 to 4

will cause the enclosed message to be sent to the server if the message length is

set to a value other than zero and the server has an open connection. Word 2 of

the block defines the length of data in the block. Up to 118 bytes of data can be

sent in each block starting at word offset 3 in the block. If the message to be sent

to a server is longer than 118 bytes, multiple blocks are required. As long as

more than 118 bytes are required to send, the message length field should be set

to a value of -1 and 118 bytes of data should be placed in the block. When 118 or

fewer bytes remain to be sent, the message length field should be set to that

value and the remaining data placed in the block. The server will accept

messages up to a length of 8192 bytes. If a message longer than 8192 bytes is

sent to a server, a transmit overflow error will be recorded and the message will

be sent when 8192 bytes are received. The remaining part of the message will

be sent as it is received.

Advertising