2.16 Details on Protocols
Extended MEMOBUS Protocol
2-383
Reading the Contents of Input Registers
Changing the State of a Single Coil
7•••••••••0
(L)
(H)
(L)
(H)
(L)
(H)
Command
Length: 07 hex
MFC: 20 hex
SFC: 04 hex
CPU number
Reference address
Number of registers (n)
Set the length of the command.
Always 20 hex.
The sub function code to read the contents of input registers is 04 hex.
Specify 4 bits each for the destination CPU number and the source CPU number.
Set the first address of the input registers to read.
Set the number of input registers to read.
7•••••••••0
(L)
(H)
(L)
(H)
(L)
(H)
Response
Length: 03 hex +
Number of registers x 2
MFC: 20 hex
SFC: 04 hex
CPU number
Data 1
Data n
Set the length of the response.
Always 20 hex.
The response will contain the sub function code that was set in the command.
Specify 4 bits each for the destination CPU number and the source CPU number.
This contains the states of the input registers that were read.
7•••••••••0
(L)
(H)
(L)
(H)
(L)
(H)
Command
Length: 07 hex
MFC: 20 hex
SFC: 05 hex
CPU number
Reference address
ON/OFF = FF/00 hex
00 hex
Set the length of the command.
Always 20 hex.
The sub function code to change the state of a single coil is 05 hex.
Specify 4 bits each for the destination CPU number and the source CPU number.
Set the address of the coil to change the state of.
Set the desired state of the coil.
7•••••••••0
(L)
(H)
(L)
(H)
(L)
(H)
Response
MFC: 20 hex
SFC: 05 hex
CPU number
Reference address
ON/OFF = FF/00 hex
00 hex
Set the length of the response.
Always 20 hex.
The response will contain the sub function code that was set in the command.
Specify 4 bits each for the destination CPU number and the source CPU number.
This contains the address of the changed coil.
This contains the state of the changed coil.
Length: 07 hex