ICP DAS USA PET-AR400 User Manual page 53

Hide thumbs Also See for PET-AR400:
Table of Contents

Advertisement

PDU
Function Code
1 byte
byte 7
Function Code
The function code field of a Modbus data unit is coded in one byte. Valid codes are in the range of
1 ... 255 decimal (the range 128 - 255 is reserved and used or exception responses). When a
Modbus request is sent from a Modbus Client to a Server device the function code field tells the
Server what kind of action to perform.
The table below shows the mapping between the function code and the register number for the
PET-AR400.
Number
Function
01 (0x01)
Read
03 (0x03)
Read
04 (0x04)
Read
05 (0x05)
Write
06 (0x06)
Write
15 (0x0F)
Write
16 (0x10)
Write
Data
Data is transmitted in 8-bit, 16-bit and 32-bit format.
The data for 16-bit registers is transmitted in high-byte first format.
For example: 0x0A0B ==> 0x0A, 0x0B.
The data for 32-bit registers is transmitted as two 16-bit registers, and is low-word first.
For example: 0x0A0B0C0D ==> 0x0C, 0x0D, 0x0A, 0x0B.
The data field may be nonexistent (of zero length) in certain kinds of requests; in this case the
server does not require any additional information. The function code alone specifies the action.
PET-AR400 User Manual
Data
N bytes
byte 8 ~ n
Function Code
Object
Coils
Multiple Holding Registers
Input Registers
Single Coil
Single Holding Register
Multiple Coil
Multiple Holding Registers
V1.0.0
Register Number
I/O Type
Number
Digital Output
0xxxxx
Analog Output
4xxxx
Analog Input
3xxxx
Digital Output
0xxxx
Analog Output
4xxxx
Digital Output
0xxxx
Analog Output
4xxxx
Top
Size
1-bit
16-bit
16-bit
1-bit
16-bit
1-bit
16-bit
P.53

Advertisement

Table of Contents
loading

Table of Contents