14-45
14 Serial Communications
CP2E CPU Unit Software User’s Manual(W614)
14-7 Modbus-RTU Slave Function
14
14-7-5 Command and Response Details
The CP2E CPU unit supports the following Modbus-RTU commands.
The frame format used in Modbus-RTU slave mode is as follows:
Note The CRC code is given in the order low byte, high byte.
Additional Information
Setting the slave address to 0 indicates a broadcast command. The CP2E CPU unit does not
return a response for broadcast commands.
Precautions for Correct UsePrecautions for Correct Use
Program retry processing in the application of Modbus-RTU master (PLC, Host computer, etc.)
when a transmission error or other communications error occurs.
z Read Multiple Bits from the Auxiliary Area (W) (Read Coils)
Command (Modbus-RTU Master)
Note The maximum number of coils depends on the assigned starting address.
Response (CP2E)
14-7-5 Command and Response Details
Supported Command List
Function Code Modbus Name Function
01 Hex Read Coils Reads multiple bits from the Auxiliary Area (W) of I/O
Memory
03 Hex Read Holding Registers Reads multiple words from the Data Memory (D)
06 Hex Write Single Register
Write a channel to Data Memory (D)
0F Hex Write Multiple Coils Writes multiple bits to the Auxiliary Area (W)
10 Hex Write Multiple Registers Write multiple channel to Data Memory (D)
Slave address Function code Data CRC
1 byte 1 byte 0 to 252 bytes 2 bytes (See note.)
Command and Response Details
Field name Data length Data
Function code 1 byte 01 Hex
Coil starting address 2 bytes 0 to 7FFHex (0 to 2047)
W0.00 to W127.15
Quantity of coils 2 bytes 1 to 7FFHex (1 to 2047)
Field name Data length Data
Function code 1 byte 01 Hex
Byte count 1 byte N
Coil status n bytes n=N or N+1