Ethernet Communications Modules, 3rd Edition, Rev. D
5-12
Chapter 5: MODBUS TCP for H0/H2/H4-ECOM100
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Example 4: C54
Find the Modbus address for Control Relay C54
1. Find Control Relays in the table.
2. Convert C54 into decimal (44).
3. Add the starting address for the range (3072).
4. Use the Modbus data type from the table.
If the Host Software or Client Requires an Address ONLY
Some Modbus TCP clients do not allow you to specify the Modbus data type and address.
Instead, you specify an address only. This method requires another step to determine the
address, but it is not difficult. Basically, Modbus also separates the data types by address ranges
as well. This means an address alone can actually describe the type of data and location. This is
often referred to as “adding the offset”.
The actual equation used to calculate the address depends on the type of PLC data you are
using. The PLC memory types are split into two categories for this purpose.
• Discrete – X, GX, SP, Y, CR, S, T, C (contacts)
• Word – V-memory , Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the appropriate
Modbus starting address (as required). The following tables show the exact range used for each
group of data.
NOTE: For an automated Modbus/Koyo address conversion utility, download the file
Modbus_conversion.xls from the www.automationdirect.com website.
Outputs (Y)
320 Y0 – Y477 2049 – 2367
Coil
Control Relays (CR)
256 C0 –C377 3072 – 3551
Coil
PLC Addr.(Dec.) + Start Addr. + Data
C54= 44 decimal
44 + 3072 + Coil =
Coil 3117
Discrete Data Types*
PLC Memory Type
Qty
(Dec.)
PLC Range
(Octal)
Modbus
Address Range
Access
Global Inputs (GX)
2048
GX0 – GX1746
GX1747 – GX3777
0 – 1023
Read Only
Inputs (X)
1024 X0 – X1777 2048 – 2367
Special Relays (SP)
512 SP0 – SP777 13073 – 13584
Reserved
– – 13585 – 20000
Global Outputs (GY)
2048 GY0 – GY3777 0 – 2048
Read/Write
Outputs (Y)
1024 Y0 – Y1777 2049 – 3072
Control Relays (CR)
2048 C0 –C3777 3073 – 5012
Timer Contacts (T)
256 T0 – T377 6145 – 6400
Counter Contacts (CT)
256 CT0 – CT377 6401 – 6656
Stage Status Bits (S)
1024 S0 – S1777 5121 – 6144
Reserved
––
–– 6657 – 10000
* Refer to your PLC user manual for the correct memory mapping size of your PLC. Some of the addresses shown above might not pertain
to your particular CPU.