136
edits
| Line 27: | Line 27: | ||
* (u8) Network address | * (u8) Network address | ||
* (u8) | * (u8) Confirmation of the command (always 0х03) | ||
* (u8) Количество выгружаемых байт ( | * (u8) Количество выгружаемых байт (always 0x08) | ||
* | * (s8) Temperature | ||
* (u8) | * (u8) High byte of Level | ||
* (u8) Low byte of Level | * (u8) Low byte of Level | ||
* (u8) Always 0 | * (u8) Always 0 | ||
| Line 40: | Line 40: | ||
* (u8) CRC16 - high byte | * (u8) CRC16 - high byte | ||
s8 | s8 means the value is a signed integer, u8 means an unsigned integer. | ||
Numbered addresses of the response bytes: | |||
{| class="wikitable" | {| class="wikitable" | ||
| | |Byte ordinal number | ||
| | |Byte ordinal number starting from 0 | ||
| | |Meaning | ||
|- | |- | ||
|1 | |1 | ||
|0 | |0 | ||
| | |Temperature | ||
|- | |- | ||
|2 | |2 | ||
|1 | |1 | ||
| | |High byte of Level | ||
|- | |- | ||
|3 | |3 | ||
|2 | |2 | ||
| | |Low byte of Level | ||
|- | |- | ||
|4 | |4 | ||
|3 | |3 | ||
| | |Always 0 | ||
|- | |- | ||
|5 | |5 | ||
|4 | |4 | ||
| | |Always 0 | ||
|- | |- | ||
|6 | |6 | ||
|5 | |5 | ||
| | |Always 0 | ||
|- | |- | ||
|7 | |7 | ||
|6 | |6 | ||
| | |Always 0 | ||
|- | |- | ||
|8 | |8 | ||
|7 | |7 | ||
| | |Always 0 | ||
|} | |} | ||
Baudrate | Baudrate does not change. | ||
'''19200, 8, n, 1''' | '''19200, 8, n, 1''' | ||
The number of bits in the package is 12x8, i.e. about 96 pcs | |||
The network number specified in the request is not important, and the number of requested registers is also not important. The main thing is that the checksum matches. The checksum calculation is given below. | |||
= '''Example of TD-500 sensor polling in Terminal program''' = | = '''Example of TD-500 sensor polling in Terminal program''' = | ||