You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i've had some problems using this lib with softwareserial. When i use hardwareserial no problems using libmodbus in PC side, but now, i trying access to some Iregs on ATMEGA328p with minicore (3 MHz) i cannot obtain any response from unit. For now, i have not a osciloscope for view physical port, but RE/DE pin (4 in my case) never change of state (measuring with DMM). Is possible use this library with SoftwareSerial? When use in normal way (sending strings) i don't have any problem reading data with Coolterm o any serial emulator, no data is displayed only using modbus lib in microcontroller
EDIT: I solved problem. Seems related to a custom serial flush function that unsynchronize request from master. But i have another question. If i try to define modbus regs as
const uint16_t reg1=100, reg2=101, reg3=102..., etc. server throws a error "illegal data address", but if i assign direct in object.addIreg (100, value); works properly. Any idea? Maybe uint16_t reg = 0, reg1 = 1... is the problem?
The text was updated successfully, but these errors were encountered:
Hello, i've had some problems using this lib with softwareserial. When i use hardwareserial no problems using libmodbus in PC side, but now, i trying access to some Iregs on ATMEGA328p with minicore (3 MHz) i cannot obtain any response from unit. For now, i have not a osciloscope for view physical port, but RE/DE pin (4 in my case) never change of state (measuring with DMM). Is possible use this library with SoftwareSerial? When use in normal way (sending strings) i don't have any problem reading data with Coolterm o any serial emulator, no data is displayed only using modbus lib in microcontroller
EDIT: I solved problem. Seems related to a custom serial flush function that unsynchronize request from master. But i have another question. If i try to define modbus regs as
const uint16_t reg1=100, reg2=101, reg3=102..., etc. server throws a error "illegal data address", but if i assign direct in object.addIreg (100, value); works properly. Any idea? Maybe uint16_t reg = 0, reg1 = 1... is the problem?
The text was updated successfully, but these errors were encountered: