GR8-EM
5-2-55, Minamitsumori, Nishinari-ku, Osaka 557-0063 JAPAN
Phone: +81(6)6659-8201 Fax: +81(6)6659-8510 E-mail: [email protected]
EM-8621 Rev.5 P. 8 / 15
■
CACHE FUNCTION
• General
The GR8-EM regularly communicates with the client (RS-485) I/O modules regardless of the presence or absence of requests
from the host (Ethernet) and stores data in its Cache area. Whenever a query is received from the host, the GR8-EM sends
data stored in the Cache without loss of time to scan the client each time.
• When many devices are connected to RS-485
When devices connected to RS-485 and requests of query increase in number, update cycle for data stored in a cache becomes
slow and data become delayed data against actual data. If this delay causes problem, disable the cache.
• Modbus commands supported for Cache function
Read Coil Status (01)
Read Input Status (02)
Read Holding Registers (03)
Read Input Registers (04)
• Number of Cache
Up to 100 Cache areas (100 queries of the commands supported for Cache) are usable.
Each Cache is managed with Slave address, Function code, Begin address and Number of register.
One Cache area is shared by identical queries. If one or more of the above differs, another Cache area is assigned.
When the number of Cache areas reaches 100, following queries will be handled as normal queries without Cache function.
Note: If no query is sent from the host for 10 seconds, the Cache is disabled.
If data received from the client result in three consecutive errors, or there is no communication between the client for 10 sec.,
the Cache is disabled.
• Modbus/TCP & Modbus RTU
Query and Response message formats are different between Modbus/TCP (Ethernet) and Modbus RTU (RS-485). For detailed
explanations, please refer to Modbus Protocol Reference Guide (EM-5650).
For example, when a query is sent to read data addresses 30017 to 30018 at the slave address 1 and ‘12345678’ is stored at
these addresses: (hexadecimal)
QUERY
Modbus/TCP
00 01 00 00 00 06 01 04 00 10 00 02
(1) (2) (3) (4) (5) (6)
Modbus RTU
01 04 00 10 00 02 70 0E
(4) (5) (6) (7)
RESPONSE
Modbus/TCP
00 01 00 00 00 07 01 04 04 12 34 56 78
(1) (2) (3) (4) (5) (6)
Modbus RTU
01 04 04 12 34 56 78 80 B0
(4) (5) (6) (7)
(1) Transaction identifier (2 bytes): The value in the query is copied into the response.
(2) Protocol identifier (2 bytes): Fixed to zero (0).
(3) Length (2 bytes): Number of following bytes.
(4) Unit identifier (1 byte): Modbus RTU slave address.
(5) Function Code (1 byte)
(6) Data fields (variable length): Related to the Function Code.
(7) CRC check (2 bytes)
(4), (5) and (6) are common to both Modbus/TCP and Modbus RTU.
Modbus/TCP is preceded by six (6) bytes of data, while Modbus RTU is followed by a CRC.