ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
28 марта
598267 Топик полностью
GDI (15.05.2015 17:34, просмотров: 350) ответил Ljutik1 на MODBUS ASCII чего-то совсем торможу под вечер
The calculation of the LRC is much easier than the CRC. To calculate the LRC: 1. Add up all the data bytes in the message (before converting to ASCII and without the initial colon and final CR/LF). 2. Throw away any bits that carry over 8 bits. 3. Make the result negative (by twos compliment) to get the LRC byte. У меня получается 0х01+0х03+0х06+0х01+0х15+0х03=0х23, 0х01-0х23 = 0xDE, откуда 0хЕС?
https://embedders.org - блоги разработчиков встраиваемых систем.