9
.
Program
42
9.2. Destination Device Command
The functions to read or write coils or registers are defined as ''Modbus functions'' in the
Modbus-RTU communication. The Destination Device can be operated (command execution)
by using the Modbus functions to read or write coils or registers defined by Destination
Device.
9.2.1. Function Code List
In the Modbus functions, a function code is allocated for each function. The following function
codes are available for Destination Device in this document.
This program performs Total Power ON Time Monitor by using the function ''Read from
Holding Register (function code: #03)''.
Code
(hex)
Function
Description
#01
Read Coil Status
Reads the coil status (ON/OFF).
#03
Read from Holding
Register
Reads the contents of consecutive holding registers.
From the specified holding register, the specified number
of holding registers can be read.
#05
Write to Coil
Writes the ON/OFF status to a single coil.
#06
Write to Holding
Register
Writes data to the specified holding register.
#08
Loop-back Test
Checks the communications between the master and the
slave. Any value can be used for test data.
#0F
Write to Multiple Coils
Rewrites the ON/OFF status to consecutive multiple
coils.
#10
Write to Multiple
Holding Registers
Writes data to consecutive multiple holding registers.
#17
Read/Write from/to
Multiple Holding
Registers
Reads data from and writes data to consecutive multiple
holding registers in a continuous manner.
Additional Information
For details on function codes, refer to
8-5 Explanation of Each Function Code
of the
Multi-function Compact Inverter MX2 Series Type V1 User’s Manual
(Cat. No. I585).
Summary of Contents for CJ2*-CPU Series
Page 63: ...58...
Page 64: ...2015 1115 P641 E1 01...