160
Table 5-4
Code Meaning Action
01 Read Relay Output Status Obtain current status of Relay Output
02 Read Digital Input(DI) Status Obtain current status of Digital Input
03 Read Data Obtain current binary value in one or more registers
05 Control Single Relay Output Force Relay to a state of on or o
16 Write Multiple-registers
Place specic value into a series of consecutive
multiple-registers
d. Data Field
The data eld is constructed using sets of two hexadecimal digits, in the range
of 00 to FF hexadecimal. The data eld of messages sent from a master to slave
devices contains additional information which the slave must use to take the
action defined by the function code. This can include items like discrete and
register addresses, the quantity of items to be handled, and the count of actual
data bytes in the field. For example, if the master requests a slave to read a
group of holding registers (function code 03), and the data eld species the
starting register and how many registers are to be read. If the master writes to
a group of registers in the slave (function code 10 hexadecimal), the data eld
specifies the starting register, how many registers to write, the count of data
bytes to follow in the data eld, and the data to be written into the registers.
2. Format of communication
Explanation of frame
Table 5-5
Transaction
identier hi
Transaction
identier lo
Protocol
identier hi
Protocol
identier lo
Length hi Length lo
Unit
identier
00H 00H 00H 00H 00H 06H 01H
Fun Data start reg hi Data start reg lo Data #of regs hi Data #of regs lo
03H 40H 00H 00H 48H