DL205 User Manual, 4th Edition, Rev. B
5–208
Chapter 5: Standard RLL Instructions - Modbus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Modbus Write to Network (MWX)
The Modbus Write to Network (MWX) instruction is used to write a block of data from the
network master’s (DL260) memory to Modbus memory addresses within a slave device on the
network. The instruction allows the user to specify the Modbus Function Code, slave station
address, starting master and slave memory addresses, number of elements to transfer, Modbus
data format and the Exception Response Buffer.
•
Port Number:
must be DL260 Port 2 (K2)
•
Slave Address:
specify a slave station address (0 to 247)
•
Function Code:
The following Modbus function codes are supported by the MWX instruction:
05 – Force Single coil
06 – Preset Single Register
15 – Force Multiple Coils
16 – Preset Multiple Registers
•
Start Slave Memory Address:
specifies the starting slave memory address where the data will be
written.
•
Start Master Memory Address:
specifies the starting address of the data in the master that is to be
written to the slave.
•
Number of Elements:
specifies how many consecutive coils or registers will be written to. This field
is only active when either function code 15 or 16 is selected.
•
Modbus Data Format:
specifies Modbus 584/984 or 484 data format to be used
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
DS
Used
HPP
N/A