DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-207
Chapter 5: Standard RLL Instructions
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 masters’s (DL06) 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.
•
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
•
Exception Response Buffer:
specifies the master memory address where the Exception Response will
be placed (6-bytes in length). See the table on the following page.The exception response buffer uses 3
words. These bytes are swapped in the MRX/MWX exception response buffer V-memory so:
V-Memory 1 Hi Byte = Function Code Byte (Most Significant Bit Set)
V-Memory 1 Lo Byte = Address Byte
V-Memory 2 Hi Byte = One of the CRC Bytes
V-Memory 2 Lo Byte = Exception Code
V-Memory 3 Hi Byte = 0
V-Memory 3 Lo Byte = Other CRC Byte
DS
Used
HPP
N/A
•
CPU/DCM
: select either CPU or DCM module
for communications
•
Slot Number
: select PLC option slot number if
using a DCM module
•
Port Number
: must be DL06 Port 2 (K2)
•
Slave Address
: specify a slave station address
(0–247)
•
Function Code
: MODBUS function codes
supported by the MWX instruction:
05 – Force Single coil
06 – Preset Single Register
15 – Force Multiple Coils
16 – Preset Multiple Registers