Frames; Command Frames - Omron E5AR-T User Manual

Programmable digital controller
Hide thumbs Also See for E5AR-T:
Table of Contents

Advertisement

Section 7 Modbus Communications

7.2 Frames

Commands from the host computer and responses from the E5AR-T/ER-T take the form of frames that
conform to the Modbus (RTU) protocol. The data included in command frames and response frames is
described in this section.
In the following descriptions, an "H" before a numeric value (for example H'02) indicates that the value is a
hexadecimal number. Numbers or letters enclosed in quotation marks (for example "00") are ASCII
characters.

■ Command Frames

● Example of CRC-16
Calculation
7-4
In RTU Mode, each frame begins and ends with a silent time interval
that is at least 3.5 characters long.
Slave
Function
address
code
Data
Bytes:
1
1
CRC-16 calculation range
Silent interval at least 3.5 characters long.
Specify the unit number of the E5AR-T/ER-T between
Slave address
H'00 and H'63 (0 to 99). When broadcasting to all nodes,
specify H'00. Responses are not returned for broadcasts.
The function code specifies the command from the host
computer. The code is set in hexadecimal and is 1 byte
Function code
long. For more information, refer to 7.3 List of Functions
(P. 7-7).
The text of command based on the function code. Speci-
Data
fies variable addresses and the values for set values in
hexadecimal.
Cyclical Redundancy Check
CRC-16
These two bytes store check code calculated from the
slave address to the end of the data in hexadecimal.
Silent interval at least 3.5 characters long.
A message is processed 1 byte at a time in a 16-bit processing
register called the CRC register.
Supplement
CRC-16 Calculation Method:
As described below, the value from the slave address through the end
of the data is calculated and the result set as the CRC-16.
(1) An initial value of H'FFFF is set in the CRC register.
(2) An XOR is taken of the contents of the CRC register and the 1st byte of
the message, and the result is returned to the CRC register.
(3) The contents of the CRC register is shifted 1 bit to the right, and 0 is
placed in the MSB.
(4) If the bit shifted from the LSB is 0, step 3 is repeated.
If the bit shifted from the LSB is 1, an XOR is taken of the contents of the
CRC register and H'A001, and the result is returned to the CRC register.
CRC-16
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

E5er-t

Table of Contents