User manual

IEC61131 User and Reference Manual
April 22, 2008
594
Converting Modbus to DF1 Addresses
I/O database registers are assigned within the controller‟s Register Assignment using
Modbus addressing. When polling the controller from an DF1 device it is necessary to know
the DF1 address corresponding to each assigned register.
In general, the cross-reference between Modbus and DF1 addressing is shown in the
following table. DF1 addresses in this table are described in the format word/bit where word
is the address of a 16-bit word and bit is the bit within that word. The bit address is optional.
Address Range
Description
Modbus
DF1
00001 to 09999
0/0 to 624/15
Digital Output Database
(single bit registers)
Modbus
DF1
10001 to 19999
625/0 to 1249/15
Digital Input Database
(single bit registers)
Modbus
DF1
30001 to 39999
1250 to 11248
Analog Input Database
(16-bit registers)
Modbus
DF1
40001 to 49999
11249 to 21247
Analog Output Database
(16-bit registers)
Coil Registers
To convert a Modbus coil register, ModbusCoil, to an DF1 address word/bit:
word = ( ModbusCoil - 00001 ) / 16
bit = remainder of { ( ModbusCoil - 00001 ) / 16 }
Status Registers
To convert a Modbus status register, ModbusStatus, to an DF1 address word/bit:
word = ( ModbusStatus - 10001 ) / 16 + 625
bit = remainder of { ( ModbusStatus - 10001 ) / 16 }
Input Registers
To convert a Modbus input register, ModbusInput, to an DF1 address word:
word = ( ModbusInput - 30001 ) + 1250
Holding Registers
To convert a Modbus holding register, ModbusHolding, to an DF1 address word:
word = ( ModbusHolding - 40001 ) + 11249
Example
In this example the equivalent DF1 addresses are shown next to a sample SCADAPack
Register Assignment specified with Modbus addresses.
Module
Start
Register
End
Register
DF1 Address
Range
SCADAPack
5601 I/O module
digital outputs
digital inputs
analog inputs
00001
10001
30001
00012
10016
30008
0/0 to 0/11
625/0 to 625/15
1250 to 1257
DIN Controller digital inputs
10017
10019
626/0 to 626/2
DIAG Force LED
10020
10020
626/3