DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-204
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
MODBUS RTU Instructions
MODBUS Read from Network (MRX)
The MODBUS Read from Network (MRX) instruction is used by the DL06 network master
to read a block of data from a connected slave device and to write the data into V–memory
addresses within the master. 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 of the data to be
read. See the table on the following page.
•
Start Master Memory Address
: specifies the starting memory address in the master where the
data will be placed. See the table on the following page.
•
Number of Elements
: specifies how many coils, inputs, holding registers or input register will
be read. See the table on the following page.
•
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
: The following MODBUS function
codes are supported by the MRX instruction:
01 – Read a group of coils
02 – Read a group of inputs
03 – Read holding registers
04 – Read input registers
07 – Read Exception status