MODBUS TD-500: Difference between revisions

 
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) Количество выгружаемых байт (always 0x08)
*        (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 - температура HEX (20°C в DEC)
* 14 - Temperature HEX (20°C in DEC)
* 04 67 - байты уровня Big Endian HEX (в прямом порядке) (или 1127 единиц в DEC)
* 04 67 - Bytes of level Big Endian HEX (1127 in DEC)
* 00 00 00 00 00 - резерв 5 байтов, не используется
* 00 00 00 00 00 - reserve 5 bytes, not used
* D8 FF - CRC-16 ModBUS контрольная сумма Little Endian HEX (Обратный порядок, т.е. FF D8)
* D8 FF - CRC-16 ModBUS checksum Little Endian HEX (FF D8)