Rockwell Automation T3837 ICS Regent MODBUS Master Package for WINTERPRET User Manual

Page 5

Advertising
background image

MODBUS Master Package for W

INTERPRET

(T3837)


P D - 6048 August, 96

(Issue 1)

5



Tables define the work that the MODBUS function block performs. The
primary table used is the ‘Read Command’ (RC) table. Each entry in the
RC table is eight bytes wide, with the first six bytes corresponding exactly
to the same fields in a MODBUS command. Each entry (starting with the
first) in the RC table sends a MODBUS command. When the response is
received, the Count field is used to decode the received data. The Index
field, in conjunction with the Read Variable table, is used to store the data in
its proper place. Tables 2 and 3 define the Read Command and Read
Variable Tables, respectively.

Table 2 - Read Command Table

Field

Size

Description

Node

Byte

The MODBUS node to broadcast this command to.

Function

Byte

The MODBUS function to broadcast.

Address

Word

The starting MODBUS address for this command.

Count

Word

The number of MODBUS variables to be returned.

CRC

Word

The pre-calculated CRC for the MODBUS command.

Offset

Word

The index into the Read Var table for the initial MODBUS
variable.

Reserved

Word

Reserved for internal use.

Table 3 - Read Variable Table

Field

Size

Description

Value

Word

The value of the regent variable.

When each entry in the Read Command table has been sent, the function
block code waits for all the replies to be returned. When all of the replies
have been received and processed, a single MODBUS scan has been
completed. At the start of the next MODBUS scan, the entire process
starts over at the beginning of the RC table.

Abstractly, the RC table can be thought of as a “Read” queue. This queue is
replenished at the start of each MODBUS scan, and is empty at the scan’s
completion. Future pseudo code examples refer to the abstract RC table
queue as the READQ.




Note:

Advertising