Mstr Write Example - ICC MBP-100 Instruction Manual

Modbus plus multiprotocol network gateway
Table of Contents

Advertisement

Address
40050
MSTR function (read)
40051
Error code
40052
Number of consecutive registers to read
40053
Starting register
40054
Destination node address
40055
Master node address
2.
Set the middle portion of the MSTR instruction to 40100. This will be the
starting address of the MSTR Data Area. This is the location that will
contain the read data returned from the MSTR transaction.
Address
40100
40101
3.
In this case, we are accessing two registers, so set the bottom portion of
the MSTR instruction ("number of registers") to 2. In the case of MSTR
reads, this number cannot be greater than 125 by definition.
4.
Initiate the read command by closing internal relay 1. The data response
will be seen in the MSTR Data Area (register 40100).

15.4 MSTR Write Example

The following example demonstrates how to use the MSTR instruction to write
4 registers starting at register 1 to an MBP-100 located at Modbus Plus network
address 32.
1.
Set up a ladder logic program as shown in Figure 37.
2.
Set the top portion of the MSTR Instruction to 40060. This will be the
starting address of the MSTR Control Block. Set the Control Block
registers to the following values:
Address
40060
MSTR function (write)
40061
Error code
40062
Number of consecutive registers to write
40063
Starting register
40064
Destination node address
40065
Master node address
3.
Set the middle portion of the MSTR instruction to 40200. This will be the
starting address of the MSTR Data Area. This is the location that will
contain the write data to be used in the MSTR write transaction.
Description
Value of register 1 @ network address 2
Value of register 2 @ network address 2
Description
67
Register Value
Value
Register Value
2
Read Only
2
1
2
1
1
Read Only
4
1
32
1

Advertisement

Table of Contents
loading

Table of Contents