-
Notifications
You must be signed in to change notification settings - Fork 137
5 Modbus.Net.Modbus(E)
Modbus in the serial port communication protocol defined by Modicon in 1979.
Modbus has four types of address: Coil(Output Coil), Discrete Input Variable(Input Coil), Input Register(Input Variable), and Holding Register(Storage Variable).
Modbus has two types of address space: standard space and extended space.
Following tables show the range of two spaces.
Type | Standard Space | Extended Space |
---|---|---|
Coil | 00001-09999 | 000001-065536 |
Discrete Input Variable | 10001-19999 | 100001-165536 |
Input Register | 30001-39999 | 300001-365536 |
Holding Register | 40001-49999 | 400001-465536 |
Modbus.Net supported two namespaces at the same time and support extended space as default, you need to check the range of the space from specifications by device.
Modbus.Net uses different address description method, following table shows the difference between them.
Standard Modbus | Modbus.Net Address |
---|---|
00001 | 0X 1 |
00002 | 0X 2 |
09999 | 0X 9999 |
065536 | 0X 65536 |
10001 | 1X 1 |
30001 | 3X 1 |
40001 | 4X 1 |
In other way, Modbus.Net can also describe bit position.
Standard Modbus | Modbus.Net Address |
---|---|
30001 13 | 3X 1.12 |
40133 12 | 4X 133.11 |
Area in Modbus.Net.Modbus are written as: "0X"(Coil), "1X"(Discrete Input), "3X"(Input Register), "4X"(Holding Register).
Don't forget to add a space between area and address.
If you want to use sub address, add dot "." between address and subaddress.
4X 1.12
Byte length of 0X and 1X is 0.125, every time add 1 address, it will add 1 bit.
You could only read data in "1X".
Sub address of 0X and 1X are always 0. There are no sub address system here.
Byte length of 3X and 4X is 2, every time add 1 address, it will add 2 bytes.
The range of sub address is from 0 to 15.
Attention: There is a change from standard Modbus to Modbus.Net.Modbus.
Sub address is always one smaller than standard Modbus.
Standard Modbus
1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Modbus.Net.Modbus
1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Modbus.Net Hangzhou Delian Science Technology Co.,Ltd. © 2023
-
2 Specification of Modbus.Net main framework
- 2.1 Modbus.Net Architecture
- 2.2 Transmission Control Layer Controller
- 2.3 Transmission Link Layer Connector
- 2.4 Concrete Protocol Layer ProtocolLinker
- 2.5 Abstract Protocol Layer Protocol
- 2.6 Protocol Presentation Layer Utility
- 2.7 Device Application Layer Machine
- 2.8 Task Application Layer MachineJob
-
3 Using Modbus.Net to implement a protocol
- 3.1 Global Tools
- 3.2 Extends Protocol and ProtocolUnit according to protocol specification
- 3.3 Extends Connector to create a link method
- 3.4 Extends Machine and Utility, creating two apis
- 3.5 Extends API methods to Machine and Utility
- 3.6 Extends Formater, Translator and Combiner, Creating Encoding,Decoding,Combining methods for address
- 3.7 Extends Controller, to control message