C code for listening in on Modbus RTU?

E

Thread Starter

Eric Ratliff

I need to write C code for a passive listener that is a HMI to display numeric data. Does anybody know of open source or sample code for this?
 
E

Eric Ratliff

Thanks pvbrowser. I did not even know that there is an open source SCADA program. After looking at the Modbus part your referred me to, I am guessing it is a Modbus Client. In other words, it issues commands and expects responses. I may not have understood this correctly, I took a quick look.

I need something that listens in on a serial line that carries commands and responses, and filters for just the responses it is looking for.

I am thinking I may ned to write from scratch(except the checksum part). Also, I'll have to restrict myself to some 'expected' commands and not have to figure out all possible commands
 
J

Jerry Miille

You can purchase (I think they have a free trial offer) a great Serial Line Monitor program from Frontline Test Equipment named Serial Test Async that will do exactly what you are looking for! I have used this software for probably nearly 15 years, maybe more. It can do everything you need to do. This program will capture the raw data, time stamp it and save it to your hard drive.

They offer a companion product that will decode the messages and make it even easier for you to read. A few bucks more but it is a great tool.

Jerry Miille
 
> I am guessing it is a Modbus Client.
> In other words, it issues commands and expects
> responses.

It can do both Master and Slave.
 
Top