Serial communication with PLC using RTU protocol


Thread Starter

Jim Semler

I have run into a problem trying to interface with a Modicon Compact 984-258 PLC using Borland C++ Builder 3.0. I have been able to write to (or think that I have) the PLC, but when using the readfile command to receive the response nothing is returned. Can anyone help me with this problem? I am not sure if there is a problem with the timeouts or maybe I am just using the writefile and readfile commmands incorrectly.

Any help is appreciated.

jim semler
[email protected]


Enrique Fernandez Araujo

Dear Jim,

You may check ports configuration, cables and connectors pin out with a Modbus simulator to verify that everything is working fine. You may find a good Modbus simulator (I guess they offer an evaluation version) in With this simulator you may use it as master to communicate with the PLC or use it as slave in another PC (perhaps it also run in
the same PC) to test your development.

Hope this help,