Modbus protocol with RS485

M

Thread Starter

Mohit

Hello Everyone
I am a computer engineering student and right now I am working on my design project which is LABORATORY DISTRIBUTED INSTRUMENTATION SYSTEM WITH THE INTERNET ACCESS.

For that purpose, I am building a RS485 LAN with PIC micro-controllers. I have 2 microcontrollers:

1) one is for temperature (it is going to read the temperature value from the temperature sensor).
2) second is for humidity ( it is going to read the humidiy value from the humidity sensor).

PIC microcontrollers are going to receive the data (for eg, temperature, humidity etc) and going to send the data to the computer. On the computer I am running a TCL script which will read the incomming data and display it on the internet.

That all is fine. But from the computer I am going to click "get me the temperature". So both the PIC microcontrollers will get the instruction and the microcontroller with the right address will reply. For that purpose I want to use the MODBUS protocol.

So basically I want to know how do I implement the protocol or in other words write a code on PIC microcontrollers. Basically I want to know how do we program or write codes for the Modbus protocol. I got some idea about the Modbus protocol from www.modbus.org but I don't know how to program it.

Anykind of help would be very much appreciated.

Thank you for your time and consideration.

Regards,
Mohit
 
Hallo Mohit,

I don´t have a solution to your problem now, but I have a problem related to yours. I have to modify a software for a pic microcontroller with RS232 based PC control operating a shaker. As an additional feature the pic has to mediate between the PC and a controller for a heating and cooling device using RS485 and the modbus protocol. Maybe you found any source code realising the modbus protocol on a pic microcontroller or you would like to place the solution to your pic problem for free in the internet?

We would be grateful for any information.

Regards,
Sven
 
Hello,

I am also a computer engineering student and I work on the same project like you. Did you find a solution to use the modbus protocol? I don't know to program it in PIC but I think I will use the internal USART in PIC. Can you help on this development and If you want I can surely help you on other part of PIC. My email is [email protected]

Regards,
Guillaume
 
Top