
Configuration as a Modbus Master
MVI56-MCM
♦
ControlLogix Platform
Modbus Communication Module
ProSoft Technology, Inc.
Page 33 of 159
July 24, 2008
Label Description
DevAddress
Used to indicate the modbus slave address for the register or registers
associated with that command. This is the offset address for the
modbus slave device. With modbus, to read an address of 40001, what
will actually be transmitted out port is Function Code 03 (one byte) with
an address of 00 00 (two bytes). This means that to read an address of
40501, you would want to put a
Func
of 3 with a
DevAddress
of 500.
This applies to modbus addresses 10001 to 47999.
Below is a definition that will help with your DevAddress setup:
FC 1, 5, or 15
DevAddress
= Modbus address in device - 0001
Example: Modbus address 0001 = DevAddress 0
Modbus address 1378 = DevAddress 1377
FC 2
DevAddress
= Modbus address in device - 10001
Example: Modbus address 10001 = DevAddress 0
Modbus address 10345 = DevAddress 344
FC 3, 6, or 16
DevAddress
= Modbus address in device - 40001
Example: Modbus address 40001 = DevAddress 0
Modbus address 40591 = DevAddress 590
FC 4
DevAddress
= Modbus address in device - 30001
Example: Modbus address 30001 = DevAddress 0
Modbus address 34290 = DevAddress 4289
4.2.3 More Master Command Configuration
Q. My Modbus addressing for my device does not look like what was described
above?
While the above information will handle most devices that you are looking to
setup, some device manufacturers have chosen to show their Modbus
addressing differently.
The two most common schemes are six-digit addressing (400101, 301000,
etc…) and some devices show their addressing already as an offset address
(the address that actually goes out on the Modbus communication line). This
is an example.
Actual Values (Input Registers) Addresses: 0200 to 0E1F
STATUS
0200
Switch Input Status
0201
LED Status Flags
0202
LED
Attribute
Flags
0203
Output Relay Status Flags
If your device manufacturer gives you addressing like this, "Input Registers"
then you will use Function Code 4, and then place the address shown in the
DevAddress field. Also, most manufacturers that show this type of addressing
will list the address in hex, as is the case with the device shown above. So for
this example device, you will want to use Func = 4 (Input Registers) with a
DevAddress of 512 decimal (200h) to read the "Switch Input Status" value.