Interoperability
(Original Document)
At a Glance
Quantum, Premium and M340 PLCs have communication server kernels that accept the common Modbus function codes. These are listed in the table on this page.
As servers, Quantum, Premium and M340 PLCs recognize all Class 0 and Class 1 Modbus function codes, as stipulated in the Modbus specifications available at http://www.Modbus.org. Their server kernel also includes the function code 23 for reading/writing of consecutive variables.
For the list of Modbus function codes recognized by Quantum PLCs, please refer to the specific Quantum documentation.
For the list of function codes recognized by Premium PLCs, please refer to the specific Premium documentation. In addition to this, Premium PLCs recognize certain UNI-TE requests.
List of Modbus Requests Recognized When Connected as a Server
The following table lists the function codes and the address of the Modbus function codes, recognized by Premium, Quantum and M340 platforms.
Function code
Quantum memory address
M340 and Premium memory address
Meaning
1
16#0XXX
%M
Read output bits, refer to note below.
2
16#1XXX
%M
Read input bits
3
16#4XXX
%MW
Read consecutive integer values (until 125 registers for Premium/Atrium PLCs)
4
16#3XXX
%MW
Read consecutive input integer values (until 124 registers for Premium/Atrium PLCs)
5
16#0XXX
%M
Write single output bit
6
16#4XXX
%MW
Write single integer value
151
16#0XXX
%M
Write n output bits
161
16#4XXX
%MW
Write consecutive integer values
232
16#4XXX
%MW
Read/write consecutive integer values3
1When using the SEND_REQ communication function to send these codes, the maximum size that can be used is 121 words (1936 bits).
2This function is neither supported nor transmitted by Premium TSX SCP 111, TSX SCP 114 and TSX SCP 1114 communication cards nor by TSX SCY 116 01 and TSX SCY 21601 communication modules.
3On the Premium platform, the Read is done before the Write.
NOTE:
The READ_VAR communication function can read, on any remote devices, up to:
  • 1008 consecutive bits for Premium CPUs.
  • 2000 consecutive bits for M340 CPUs.
To be able to read more than these limitations, the SEND_REQ communication function must be used.
Use of Modbus Function Codes as a Client on Premium and M340
The table below lists the Modbus function codes and their use as a client on Premium, Quantum and M340 PLCs.
Function code
Quantum memory address
M340 and Premium memory address
Modbus request
Communication function
1
16#0XXX
%M
Read output bits
READ_VAR
2
-
%I
Read input bits, see 1)
READ_VAR
3
16#4XXX
%MW
Read consecutive integer values (until 125 registers for Premium/Atrium PLCs)
READ_VAR
4
-
%IW
Read consecutive input integer values (until 124 registers for Premium/Atrium PLCs), see 1)
READ_VAR SEND_RER for Premium/Atrium PLCs
15
16#0XXX
%M
Write n output bits
WRITE_VAR
16
16#4XXX
%MW
Write consecutive integer values
WRITE_VAR
1) The addresses %I and %IW cannot be used when creating a communication function of type READ_VAR with the function input assistant.
The way in which to use function codes with communication functions is described in the Modbus manual.
NOTE: Interoperability with Windows applications is provided by access to the PLC variables using OFS software.
WARNING
UNEXPECTED APPLICATION BEHAVIOR - DATA EXCHANGE COMPATIBILITY
Data structure alignments are not the same for Premium/Quantum and M340 PLCs so verify that the data exchanged are compatible.
See the page DDT: Mapping rules for more information.
Failure to follow these instructions can result in death, serious injury, or equipment damage.