2. Modbus
2.1.
Settings
•
Communication speed :
between 2400 and 115200 bauds, 19200 bauds by default
•
Data Bits :
8 bits
•
Stop bit :
1 bit
•
Parity :
None
•
Flow control :
None
•
Transmitter addressing :
between 1 and 255 (always answers to requests from address 0)
•
Data sending :
carried out by words of 2 bytes, in the following order : high weight then low weight
2.2.
Functions
•
Registers reading :
Function 03
•
Registers writing :
Function 16
•
Communication loop test :
Function 08
2.3.
Access code to register
•
Registers type
Type
Size
Designation
Format
U8
1 byte
Unsigned integer 8 bits
Byte 1
Example with a
24 (0x18)
value
0x18
Type
Size
Designation
Format
U16
2 bytes
Unsigned integer 16 bits
Byte 2
Byte 1
Example with a
300 (0x
01
2C
)
value
0x01
0x2C
Type
Size
Designation
Format
U32
4 bytes
Unsigned integer 32 bits
Byte 2
Byte 1
Byte 4
Byte 3
Example with a
1 096 861 217
(0x
41
60
C6
21
)
value
0xC6
0x21
0x41
0x60
Type
Size
Designation
Format
Real
4 bytes
Real 32 bits
Byte 2
Byte 1
Byte 4
Byte 3
Example with a
153.5 (0x
43
19
80
00
)
value
0x80
0x00
0x43
0x19
Type
Size
Designation
Format
Enumeration
1 byte
See the Enumeration table
page 8
Idem U8
Boolean
1 byte
True = 1 ; False = 0
Idem U8
6
Modbus