Download MODBUS(R) Interface Module User`s Manual

Transcript
4
MODBUS(R) STANDARD FUNCTIONS
4.18 Write File Record (FC: 21) (SC: 06)
Writes multiple extension file register values.
(1) Request message format (Master
Function
code
Slave)
Data
Sub-request 1
Function
code
(15H)
Number of
bytes
mx7
Reference
number
(06H)
File number
(0000H to FFFFH)
*1
(H)
Write head
device number
(0000H to 270FH)
(H)
(L)
Write points
n1
(0001H to 007AH)
(L)
(L)
(H)
. . .
Device
data
1
Device
data
n1
(H)
(L)
(H)
(L)
(Number of bytes m x 7)
Data
Sub-request m
File number
(0000H to FFFFH)
*1
Reference
number
(06H)
(H)
Write head
device number
(0000H to 270FH)
(L)
(H)
Write points
nm
(0001H to 007AH)
(L)
(H)
. . .
Device
data
1
(L)
(H)
(L)
Device
data
nm
(H)
(L)
(Number of bytes m x 7)
Figure 4.94 Write file record (Request message)
*1
The maximum file number available for the QJ71MB91 slave function is dependant on the file
register size of the mounted PLC CPU. (
Section 7.3.2)
(a) Write points of each sub-request
Specify the total points N (n1+...+nm) so that the protocol data unit size of the
response message will not exceed 253 bytes.*2
2+m
7+N
2
253*2
If the above condition is not satisfied, the request message is discarded.
* 2 When the frame mode is ASCII mode, it is 506 bytes.
4 - 57
4.18 Write File Record (FC: 21) (SC: 06)