Omron VARISPEED L7 Manual page 235

Hide thumbs Also See for VARISPEED L7:
Table of Contents

Advertisement

Function Code
The function code specifies commands. The three function codes shown in the table below are available.
Function Code
(Hexadecimal)
03H
08H
10H
Data
Configure consecutive data by combining the memory register address (test code for a loop back address) and
the data the register contains. The data length changes depending on the command details.
Error Check
Errors during communications are detected using CRC-16 (cyclic redundancy check, checksum method).
The result of the checksum calculation is stored in a data-word (16 bit), which starting value is FFFH. The
value of this word is manipulated using Exclusive OR- and SHIFT operations together with the data package
that should be sent (slave address, function code, data) and the fixed value A001H. At the end of the calcula-
tion the data-word contains the checksum value.
The checksum is calculated in the following way:
1. The starting value of the 16 Bit data-word, that is used for the calculation, has to be set to FFFFH.
2. An Exclusive OR operation has to be performed with the starting value and the slave address.
3. The result has to be shifted to the right until the overflow bit becomes 1.
4. When this bit becomes 1, an Exclusive OR operation with the result of step 3 and the fix value A001H has
6
to be performed.
5. After 8 shift operations (every time when the overflow bit becomes 1, an Exclusive OR like in step 4 has to
be done), perform an Exclusive OR operation with the result of the former operations and the next data
package (8 bit function code). Again the result of this operation has to be shifted 8 times and if needed it
has to be interconnected with the fix value A001H using an Exclusive OR operation.
6. The same steps have to be performed with the data, first with the higher byte and then with the lower byte
until all data are proceeded.
7. The result of these operations is the checksum. It consists of a high and a low byte.
84
6-
Function
Read memory register contents
Loop back test
Write multiple memory registers
Command Message
Min. (Bytes) Max. (Bytes) Min. (Bytes) Max. (Bytes)
8
8
8
8
11
41
Response Message
7
37
8
8
8
8

Hide quick links:

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents