2. MODBUS/TCP PROTOCOL
2 - 8
2.3.4 Preset Multiple Registers (Writing data in multiple holding registers: 10h)
Data is written to consecutive holding registers for the specified number of data points starting from the
specified register address.
(1) Message frame
Query Message
Transaction
Identifier
Protocol
Identifier
Length Field
Unit
Identifier
Function
Starting
Address
No. of
Registers
Byte
Count
Data
H L H L
H L to H L
16 bits
0000h
16 bits
FFh
10h
8
Bit
8
Bit
8
Bit
8
Bit
8
Bit
8
Bit
8
Bit
to
8
Bit
8
Bit
Message field
Size
Description
Transaction Identifier
(Transaction identifier)
16 bits
Set any value.
Protocol Identifier
(Protocol identifier)
16 bits
Set "0000h".
Length Field (Message length)
16 bits
Set the byte length from Unit Identifier to Data.
Unit Identifier (Unit identifier)
8 bits
Set "FFh".
Function (Function field)
8 bits
Set "10h".
Starting Address (Start address)
(Note)
16 bits
Set the start address of the holding registers to which data is written.
No. of Registers
(Number of registers to write)
16 bits
Set the number of points of data to write starting from the start address of the
holding registers to which data is written.
Set the number of write points described in the list of holding registers.
To write data in continuous registers, set a value obtained by adding the number
of write points of the target registers to this number.
Byte Count (Byte count)
16 bits
Set the size of the data to write.
Data (Writing data) (Note)
16 bits × n
Set the data to write.
Response Message
Transaction
Identifier
Protocol
Identifier
Length Field
Unit
Identifier
Function
Starting Address
No. of Points
H L H L
16 bits
0000h
0006h
FFh
10h
8 bits
8 bits
8 bits
8 bits
Message field
Size
Description
Transaction Identifier
(Transaction identifier)
16 bits
Transaction Identifier received from the client (controller) is copied and returned.
Protocol Identifier
(Protocol identifier)
16 bits
The value "0000h" is returned.
Length Field (Message length)
16 bits
The byte length from Unit Identifier to Data is returned.
Unit Identifier (Unit identifier)
8 bits
Unit Identifier received from the client (controller) is copied and returned.
Function (Function field)
8 bits
When the message was received without errors, "10h" is returned.
Starting Address (Start address)
16 bits
The start address of the holding registers to which the data was written is
returned.
No. of Registers
(Number of registers to write)
16 bits
The number of points of written data starting from the start address of the holding
registers to which the data was written is returned.
Note. Registers can be classified into two types: registers to which data can be continuously written and particular registers to which
data cannot be continuously written.
To write data in particular registers, write data in the target registers one by one.
For the details on whether the target registers can be continuously accessed or not, refer to chapter 6.
Содержание MELSERVO-JE MR-JE-C
Страница 9: ...A 8 MEMO ...
Страница 83: ...MEMO ...