M
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
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