Request ibaPDA -> Modbus Server
|
Offs |
Bytes |
Type |
Modbus Description |
Contents(hex) |
ibaPDA Description |
|
|---|---|---|---|---|---|---|
|
MBAP |
00 |
2 |
UINT |
Transaction Identifier |
xx xx |
Incremented automatically in each cycle |
|
02 |
2 |
UINT |
Protocol Identifier |
00 00 |
0 |
|
|
04 |
2 |
UINT |
Cmd Length |
00 06 |
6 |
|
|
06 |
1 |
BYTE |
Unit Identifier |
xx |
Modbus server number |
|
|
Fcode |
07 |
1 |
BYTE |
Function code |
xx |
01: Read Coils 02: Read Discrete Inputs 03: Read Holding Register 04: Read Input Register |
|
Data |
08 |
2 |
UINT |
Starting Address |
xx xx |
1. Address |
|
10 |
2 |
UINT |
Number of Data |
xx xx |
No. of Coils, Input bits, Holding Registers or Input Registers |
Response Modbus -> Server ibaPDA
|
Offs |
Bytes |
Type |
Modbus Description |
Contents(hex) |
ibaPDA Description |
|
|---|---|---|---|---|---|---|
|
MBAP |
00 |
2 |
UINT |
Transaction Identifier |
xx xx |
Mirror of request |
|
02 |
2 |
UINT |
Protocol Identifier |
00 00 |
0 |
|
|
04 |
2 |
UINT |
Cmd Length |
00 07 |
= nBytes + 3 |
|
|
06 |
1 |
BYTE |
Unit Identifier |
xx |
Mirror of request |
|
|
Fcode |
07 |
1 |
BYTE |
Function code |
xx |
Mirror of request |
|
Data |
08 |
1 |
BYTE |
Number of Bytes |
xx |
nBytes |
|
09 |
n |
BYTE |
Data |
xx xx |
Input values |
Examples
|
Function 01: Read Coils |
|||
|---|---|---|---|
|
Request |
(hex) |
(hex) |
Response |
|
Transaction Identifier |
00 01 |
00 01 |
Transaction Identifier |
|
Protocol Identifier |
00 00 |
00 00 |
Protocol Identifier |
|
Cmd LEN |
00 06 |
00 06 |
Cmd LEN |
|
Unit Identifier |
00 |
00 |
Unit Identifier |
|
FCode |
01 |
01 |
FCode |
|
Start Adr (Hi) |
00 |
03 |
No. byte |
|
Start Adr (Lo) |
13 |
xx |
Coils 27-201 |
|
No. Values (Hi) |
00 |
xx |
Coils 35-28 |
|
No. Values (Lo) |
14 |
xx |
Coils 39-36 |
|
Function 02: Read Discrete Inputs |
|||
|---|---|---|---|
|
Request |
(hex) |
(hex) |
Response |
|
Transaction Identifier |
00 02 |
00 02 |
Transaction Identifier |
|
Protocol Identifier |
00 00 |
00 00 |
Protocol Identifier |
|
Cmd LEN |
00 06 |
00 05 |
Cmd LEN |
|
Unit Identifier |
00 |
00 |
Unit Identifier |
|
FCode |
02 |
02 |
FCode |
|
Start Adr (Hi) |
00 |
02 |
No. Byte |
|
Start Adr (Lo) |
C4 |
xx |
Inputs 204-197 |
|
No. Values (Hi) |
00 |
xx |
Inputs 206-205 |
|
No. Values (Lo) |
0A |
||
|
Function 03: Read Holding Registers |
|||
|---|---|---|---|
|
Request |
(hex) |
(hex) |
Response |
|
Transaction Identifier |
00 03 |
00 03 |
Transaction Identifier |
|
Protocol Identifier |
00 00 |
00 00 |
Protocol Identifier |
|
Cmd LEN |
00 06 |
00 0B |
Cmd LEN |
|
Unit Identifier |
00 |
00 |
Unit Identifier |
|
FCode |
03 |
03 |
FCode |
|
Start Adr (Hi) |
00 |
08 |
No. Byte |
|
Start Adr (Lo) |
6B |
xx xx |
Register 108 (Hi, Lo) |
|
No. Values (Hi) |
00 |
xx xx |
Register 109 (Hi, Lo) |
|
No. Values (Lo) |
04 |
xx xx |
Register 110 (Hi, Lo) |
|
xx xx |
Register 111 (Hi, Lo) |
||