• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

RS485 MODBUS DISCONNECT

Started by MTZOVARAS, December 03, 2024, 05:30:12 am

Previous topic - Next topic

MTZOVARAS

Hello,
i have an RS-232, a module to convert to RS-485 and a SEPAM device with MODBUS
i am asking continuously the device about some modbus register
as you can see at the screenshot i get some "disconnect" and "connect" back from the "DeviceState" routine

For which reason the "DeviceState" routine can give a "disconnect" message ?

The RS-232 port ? The cable ? The MODBUS device ?

Thank you,
Minas

Roman Novgorodov

Hello

If you make a long time infinite poll, it is normal that you get TIMEOUT some times. Serial line (rs485/232) can lost data and modbus protocol detects data corruption.

If modbus gets TIMEOUT it decides that device disconnected and notifies abut that.

For reduce TIMEOUTs you can try following;
1) Reduce baud rate (f.e. from 115200 to 9600)
2) Use twisted pair for connect rs485
3) Place twisted pair separately from power line wires (high voltage or currents).

But in generally TIMEOUT is normal in real world in industrial solutions.

Roman Novgorodov
Deepsoftware
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.