Mstr control block – Yaskawa VS-616G5 Modbus Plus Communication Card User Manual
Page 24

Modbus Plus MSTR Function 5-3
MSTR Control Block
The data entered in the top section of the MSTR function block is the address of the first register
in the Control Block. The Control Block is a sequential group of nine registers in the PLC. The
Control Block registers are used to transfer information between the ladder logic and the MSTR
function block.
Information transferred from the ladder logic to the MSTR include:
??
the type of Modbus Plus transaction (read, write, global write, global read)
??
the address of the drive (node)
??
the data code of the first register to be transferred
??
the number of registers that will be transferred
??
the routing path to the drive
Information transferred from the MSTR to the ladder logic include:
??
the status of the Modbus Plus transaction.
The Control Block registers must have an address in the 4X range.
The Control Block registers are defined as:
CONTROL BLOCK
Control Block
Offset
MSTR Word
Description
Comments
4X + 0
Operation Code
1 = Multiple Register Write 5= Write Global Data
2 = Multiple Register Read 6= Read Global Data
4X + 1
Network Error Code
Communication link status - returned from MB+ link
4X + 2
Number of Registers
Length of the data area
4X + 3
Drive Register Data
Code
Register of the requested/written information
4X + 4
Routing 1
Routing register #1 / local network
4X + 5
Routing 2
Routing register #2
4X + 6
Routing 3
Routing register #3
4X + 7
Routing 4
Routing register #4
4X + 8
Routing 5
Routing register #5
The Operation Code (4X + 0) is used by the ladder logic to indicate the type of transaction that will
be performed. Valid operation codes are defined in the following table:
MSTR Function
Operation Code
Write Data
1
Read Data
2
Write Global Data
5
Read Global Data
6
The Network Error Code (4X + 1) is used by the MSTR to indicate the status of the transaction. If
any error occurs during the transaction, an error code will be transferred into this register. A list of
MSTR error codes can be found in Chapter 8.