beautypg.com

Btr/btw status block – ProSoft Technology MVI71-GSC User Manual

Page 52

background image

MVI71-GSC ♦ PLC Platform

Reference

Generic Serial Communication Module

Page 52 of 82

ProSoft Technology, Inc.

January 31, 2008

Received data field. This indicates that there will be more blocks to follow and
that the current block contains maximum number of bytes of data. As long as
more than the maximum bytes are present in the buffer being sent to the
controller, the length field will be set to a value of -1. When the buffer contains
the maximum or fewer bytes as defined for the interface, the module will send the
last block with a positive number in the length field. The value passed represents
the number of bytes present in the data area. The ladder logic must recognize
the presence of the positive number and end the packet received.

Two word values in the block transferred from the module inform the processor of
the number of bytes transferred in the last write block to the respective port
transmit buffers. If a value of zero is returned in one of these words and data was
sent in the last write block, the ladder logic must re-send the data in the next
write block as the port is in a busy state and cannot buffer the new data. If a
value is returned in one of these words, the value represents the number of bytes
in the last write block moved into the port's transmit buffer.

BTR/BTW Status Block
The status information transferred in the read block can be used by the
processor to determine the state and "health" of the module and the device(s)
attached to each application port. An important member of the value in the status
object is error word for each port. This value contains the configuration error flags
for each port and the receive buffer overflow error flag.

When the BTR/BTW interface is utilized, the status data will be transferred to the
module in the normal read data blocks. The data will reside in the block in the
normal receive data area of the block. This data is placed in blocks that have a
receive data length parameter of zero for a port. When no data is present in the
receive buffer for Port 1 or Port 2 the module will pass the respective status data
to the processor as shown below:

Word Offset

Description

0

Block Sequence Number (Bumped each scan by module) (0 to 127)

1

Number of bytes received on Port 1 is set to zero.

2

Number of characters transmitted (0 to 50) from last block write Port 1

Module Status

Word Offset

Description

3

Program cycle counter

4 to 5

Product name as ASCII string

6 to 7

Revision level as ASCII string

8 to 9

Operating system level as ASCII string

10 to 11

Run number as ASCII string

12

Number of blocks transferred from module to processor

13

Number of blocks transferred from processor to module

14

Number of blocks parsed by module

15

Number of block errors in module