136
edits
| Line 28: | Line 28: | ||
* (u8) Network address | * (u8) Network address | ||
* (u8) Confirmation of the command (always 0х03) | * (u8) Confirmation of the command (always 0х03) | ||
* (u8) | * (u8) Number of bytes requested (always 0x08) | ||
* (s8) Temperature | * (s8) Temperature | ||
* (u8) High byte of Level | * (u8) High byte of Level | ||
| Line 112: | Line 112: | ||
The resulting value must be written to the command being sent. In this case, the value obtained during the calculation 0C 44 should be written to the command as 44 0C. | The resulting value must be written to the command being sent. In this case, the value obtained during the calculation 0C 44 should be written to the command as 44 0C. | ||
'''Response from the sensor:''' | == '''Response from the sensor:''' == | ||
'''01 03 08 14 04 67 00 00 00 00 00 D8 FF''' | '''01 03 08 14 04 67 00 00 00 00 00 D8 FF''' | ||
* 01 - | * 01 - Sensor network address | ||
* 03 - | * 03 - Read command | ||
* 08 - | * 08 - Number of bytes in response | ||
* 14 - | * 14 - Temperature HEX (20°C in DEC) | ||
* 04 67 - | * 04 67 - Bytes of level Big Endian HEX (1127 in DEC) | ||
* 00 00 00 00 00 - | * 00 00 00 00 00 - reserve 5 bytes, not used | ||
* D8 FF - CRC-16 ModBUS | * D8 FF - CRC-16 ModBUS checksum Little Endian HEX (FF D8) | ||