UM-0085-B09
DT80 Range User Manual
Page 177
RG
Furthermore, it is common for the different register arrays to overlap. In the example device mentioned above, the 16
coils and discrete inputs may actually refer to the same physical hardware – in this case 16 bi-directional I/O pins. So for
this slave device, if a client wrote a "1" to coil 0:00007, it would then read the same value back if it did a read from
discrete input 1:00007.
Accessing DT80 Channels via Modbus
The DT80 maps blocks of Modbus registers onto certain DT80
channels
(channel variables and digital channels), as
specified in the following tables. The Modbus client can therefore directly access any of these DT80 channels by
transmitting a request to read or write the associated Modbus register(s).
The first table shows the action taken by the DT80 in response to requests by the client system to read particular
Modbus registers:
Register number
(as specified
in Modbus client application)
Type of register to
read
Action taken by
DT80
0:00001-0:02000
1:00001-1:02000
coil 1-2000
discrete 1-2000
returns current state of channel variable
1..2000CV
(0 if CV value is
0.0, otherwise 1)
3:00001-3:02000
4:00001-4:02000
input reg 1-2000
output reg 1-2000
returns current value of channel variable
1..2000CV
0:02001-0:02500
1:02001-1:02500
coil 2001-2500
discrete 2001-2500
returns current state of integer variable
1..500IV
(0 if CV value is 0.0,
otherwise 1)
3:02001-3:02500
4:02001-4:02500
input reg 2001-2500
output reg 2001-2500
returns current value of integer variable
1..500IV
0:04001-0:04085
1:04001-1:04085
coil 4001-4085
discrete 4001-4085
returns current state of system variable
1..85SV
(0 if SV value is 0.0,
otherwise 1)
3:04001-3:04085
4:04001-4:04085
input reg 4001-4085
output reg 4001-4085
returns current value of system variable
1..85SV
0:08001-0:08009
coil 8001-8009
returns current state of digital output
1..8DSO
or
1RELAY
1:08001-1:08008
discrete 8001-8008
returns current state of digital input
1..8DS
3:08001-3:08008
input reg 8001-8008
returns current state of digital input
1..8DS
as a numeric value (0 or 1)
4:08001-4:08009
output reg 8001-8009
returns current state of digital output
1..8DSO
or
1RELAY
as a numeric
value (0 or 1)
The next table shows the action taken by the DT80 in response to a write request:
Register number
(as specified in
Modbus client application)
Type of register to
write
Action taken by
DT80
0:00001-0:02000
coil 1-2000
sets channel variable
1..2000CV
to 0.0 or 1.0
4:00001-4:02000
output reg 1-2000
sets channel variable
1..2000CV
to the specified value
0:02001-0:02500
coil 2001-2500
sets channel variable
1..500IV
to 0.0 or 1.0
4:02001-4:02500
output reg 2001-2500
sets channel variable
1..500IV
to the specified value
0:04001-0:04085
coil 4001-4085
sets system variable
1..85SV
to 0.0 or 1.0 (writable SVs only)
4:04001-4:04085
output reg 4001-4085
sets system variable
1..85SV
to the specified value (writable SVs
only)
0:08001-0:08009
coil 8001-8009
sets digital output
1..8DSO
or
1RELAY
to the specified value
4:08001-4:08009
output reg 8001-8009
sets digital output
1..8DSO
or
1RELAY
to the specified value (0 if the
specified value is 0, otherwise 1)
If the Modbus client attempts to access any register outside the ranges specified above then the
DT80
will return a
Modbus error response and ignore the request.
Note:
for the DT81/ 82, Modbus registers x8001-x8004 correspond to channels
1..4DS
and
1..4DSO
. Accessing registers x:08005-
x:08008 will not cause an error, but it will not do anything either, because these channels are not present on the DT81/ 82. Register
x:08009 corresponds to the
1RELAY
channel, as with the DT80.
Data Types
Modbus input and output registers are 16 bits wide. The Modbus standard does not, however, define how these bits are
to interpreted, other than stating that the most significant byte of a register value is transmitted first ("big endian" format).
By default, the
DT80
interprets a Modbus register as a signed 16-bit integer in the range -32768 to 32767. If a CV or
SV's value is outside this range then the associated Modbus register will "saturate", i.e. the value 32767 will be returned
if the CV/SV value is greater than 32767, and the value -32768 if the value is less than -32768. Also, the CV/SV value
will be rounded to the nearest integer.