cwalter-at / freemodbus

BSD licensed MODBUS RTU/ASCII and TCP slave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTU and TCP outputs only show the least significant byte of the registers

jimhumphriesFMI opened this issue · comments

Hi, I am running this software on an STM32F407 running as a modbus slave device. Everything works fine except when i poll data from the device and read the holding registers via either RTU or TCP I only receive the least significant byte of the register even though the modbus master specifies to read INT16 data. Any idea why it is not transmitting the upper byte of the register? I inherited this project from a previous developer so I do not want to start modifying it until I know if there is a simple solution or not.

This is an error in your own implementation, possibly in the callbacks implementing functions, or on your own receiving end. Plenty of us are using this quite happily with full 16bit registers.