I have a device which provides data for remote monitoring and controlling via RS-485 port working on MODBUS RTU protocol. I wish to monitor/control this unit by my PC through ethernet port RJ-45. Searching this query on google, led me to assume this can be done by arduino devices. Need your help/suggestions as to how I might be able to pull this off, including what kind of arduino device I need for this task and the code for arduino? Some details of the device I wish to monitor/control are as below:
Transmission Mode: MODBUS RTU
Baud Rate: 9600
Parity: Even
Stop Bits: 1
Data Bits: 8
Valid Slave Addresses programmable: 1 to 247
Data Read: Read Holding Registers
Data Write: Preset Multiple Registers
Numeric values for Status & command are 16 bit variables (Each condition is represented by one bit, An active condition is shown by a binary 1.)
This is a rather complex project to start in the Arduino world. I would recommend that you start with easier stuff and return to this project once you got familiar with the Arduino platform.
including what kind of arduino device I need for this task and the code for arduino?
A possible device for this is an Arduino Leonardo ETH or an Arduino Leonardo with an Ethernet Shield (you told us that it must be Ethernet although you didn't tell us why you have this requirement). Additionally you need an RS-485 driver module.
As for the code, you might need a Modbus library but that depends on the software you use on the PC.
Don't expect to find ready-to-use sketches for your purpose as it isn't an every day project. So even if you find a library to handle the Modbus protocol for you, there's still a lot additional software to develop. So be prepared to learn a lot to make this project successful.
Thanks for your reply Pylon. I do understand the complexity of this project and your recommendation for start with something easier. Actually, the scenario is that this is a requirement of a firm and I am working on the feasibility of this project. Regarding the Arduino code I may hire services of Arduino programmer but prior to that I need to be sure if it is possible and the availability of requried devices in my country.
Thanks for mentioning the arduino device. I want the device in ethernet because the monitoring station is far from the device itself so considering the distance I choose ethernet. however, if there is any other mode via which we can connect the arduino device with the PC please do let me know.
Can you please let me know the software which I can use to monitor the data from arduino?
Thanks for mentioning the arduino device. I want the device in ethernet because the monitoring station is far from the device itself so considering the distance I choose ethernet. however, if there is any other mode via which we can connect the arduino device with the PC please do let me know.
As Modbus RTU runs on RS-485 as the physical layer, you can go with a 2-wire cable for about 1200m. That's more than you get with Ethernet but if you already have Ethernet wired to that location, this is perfectly possible. You just have to think about the protocol you want to use on the network, several come to mind (HTTP, MQTT, etc.) but the choice depends heavily on your PC programming skills/existing programs/customer limitations.