301
4
4 Instructions 4.11.2 Verication
The MODBUS instruction is used for the communication of Modbus-enabled slave devices (for example,
MD320, MD300, and MD280 series AC drives). In example 1, the PLC continuously reads data from
registers from head address K100 of slave 1 and stores the data in units from head address D10.
Usage:
Different from the RS instruction, multiple MODBUS instructions can be executed simultaneously in a
program.
The MODBUS instruction does not require the processes of setting M8122 to ON and resetting M8123.
4.11.2 Verication
Verication
CCD Check code
CRC CRC code calculation
LRC LRC code calculation
CCD: Check code
◆
Overview
When driving conditions are met, the CCD instruction calculates the checksum of the K data entries from
head address S. The summation result is stored in D, and the XOR logical operation result is stored in D+1.
CCD S D n
Check code Applicable model:
H3U
S Data source
Head address of consecutive units that store the variables
whose checksum will be calculated
16-bit instruction
(7 steps)
CCD: Continuous
execution
CCDP: Pulse
execution
D
Operation
result
Summation result stored in D; XOR logical operation result
stored in D+1
n
Checked
byte count
Number of bytes contained in checked variables
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
Two types of checksum operation are performed on n variables from head address S. The summation
result is stored in D, and the XOR logical operation result is stored in D+1. The string checksum operation
ensures correct data transfer during communication.