Modbus Write to Network (MWX)
The Modbus Write to Network (MWX) instruction is used to write a block of data from the
network masters’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–247)
• Function Code
: The following Modbus function codes are supported by the MWX instruction:
05 – Force Single coil
06 – Preset Single Register
08 – Diagnostics
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
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.
• Exception Response Buffer
: specifies the master memory address where the Exception Response
will be placed.
DL205 User Manual, 4th Edition, Rev. B
4–50
Chapter 4: System Design and Configuration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0