Documente Academic
Documente Profesional
Documente Cultură
7
This section describes the implementation of the Modbus/TCP Server feature for the PACSystems family of products.
GFK-2224F
7-1
Modbus/TCP Server
The PACSystems products listed below support Modbus/TCP Server functionality:
CPU010 and CPU020 with primary firmware version 3.0 or later. CRE020 with Ethernet firmware version 3.0 or later. RX7i: IC698ETM001 and RX3i IC695ETM001 with firmware version 3.0 or later.
7-2
GFK-2224F
Reference Mapping
The Modbus protocols reference table definition is different from the internal structure of the PACSystems reference tables. Modbus refers to Holding Register, Input Register, Input Discrete and Coil tables; PACSystems uses Discrete Input (%I), Discrete Output (%Q), Analog Input (%AI), Register (%R), and Word (%W) reference tables for Modbus data. The following table shows how each Modbus table has been mapped to the PACSystems reference tables.
%I1 32768 (bits) %AI1 32640 (16-bit words) %Q1 32768 (bits) %R1 32640 (16-bit words) %W1 5,242,880 (16-bit words)
Read Multiple Registers Write Multiple Registers Write Single Register Mask Write Register Read/Write Multiple Registers
GFK-2224F
7
Modbus Input Discrete Table
The Modbus Input Discrete table is mapped exclusively to the CPU Discrete Input (%I) table. Applicable Functions
Translating %W Reference Addresses To find the PACSystems %W memory address equivalent of a Modbus File and Record: %W = 10,000 (F-1) + R To find the Modbus File and Record equivalent of a PACSystems %W memory address:
File = W-1 +1 10,000
(Discard any fractional portion; round the result downward to the next integer value).
CAUTION
If you use the Modbus function Write File Record, and specify multiple record sections, the first N-1 sections will be written to the servers PLC reference memory, even if an error prevents the writing of the last section.
7-4
GFK-2224F
Address Configuration
Address mapping is done in the Machine Edition Hardware Configuration of the CPU. All Ethernet modules and daughterboards in the PLC use Modbus-to-PLC address mapping based on this one map. The Modbus/TCP Server does not use COMMREQs to configure address mapping. Each PLC memory area is mapped to an appropriate Modbus address space. On the Settings tab, Modbus Address Space Mapping can be set to Standard Modbus Addressing or Disabled. If Modbus Address Space Mapping is set to Standard, the Modbus/TCP Address Map tab displays the standard references assignments.
Number 1 2 3 Modbus Register 0xxxx Coil Table 1xxxx Discrete Table 3xxxx Input Registers 4xxxx Register Table 6yxxx Internal Table Start Address 1 1 1 End Address 32768 32768 64 PLC Memory Address %Q00001 %I00001 %AI00001 Length 32768 32768 64
4 5
1 0
1024 0
%R00001 %W0001
1024 0
When Modbus Address Space Mapping is set to Disabled on the Settings tab, the Modbus/TCP Address Map tab does not appear. If the CPU module does not receive an address map from Machine Edition, Ethernet interfaces within the PLC will respond to Modbus/TCP clients with Exception Code 4, Slave Device Failure. This same exception code will also be returned when the PLCs hardware configuration is cleared.
GFK-2224F
7-5
0xxxx 1xxxx
1 1
32768 32768
%Q00001 %I00001
32768 32768
4xxxx
1024
%R00001
1024
3xxxx n/a
1 N/a
64 n/a
%AI00001 n/a
64 n/a
6yxxxx
%W00001
7-6
GFK-2224F