modbus

m.rezah

Member
Join Date
Aug 2016
Location
shiraz
Posts
2
hello
i want to connect an Arduino board with plc using modbus.
but i dont know what modbus is or how to actually use it
can anyone help me?
or give me a source so i can read about it?

tanx a lot
 
Modbus is a common industrial communications protocol. The question is do you want the Arduino to read from the PLC or the PLC to read from the Arduino. If you want the Arduino to read from the PLC then you will need Modbus Master code for the Arduino. If you want the PLC to read from the Arduion then you'll need Modbus slave code for the Arduino.

Here is one (of many?) links to relevant libraries.

https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino

I also recommend that you go to this site and do a review of the Modbus protocol.

http://modbus.org/docs/PI_MBUS_300.pdf

Finally go to YouTube and look for Modbus tutorials. There are plenty available.

Yosi
 
If you want the Arduino to read from the PLC then you will need Modbus Master code for the Arduino. If you want the PLC to read from the Arduion then you'll need Modbus slave code for the Arduino.
To complement Yosi's response: If you have VERY FEW datapoints to transfer between the PLC <-> Arduino (AND if you do NOT require flexibility), it may be overkill to implement the whole (master or slave) library in Arduino.
You will, however, need to be able to calculate a CRC/LRC, depending on the format of the frame (ASCII, RTU, Ethernet)

A Modbus frame is not difficult to assemble and a response is not difficult to parse(assuming very few datapoints).
 
Hi!

I made a tutorial showing how to connect an arduino to a raspberry pi running codesys here.

I based mine of the mudbus library in arduino, but slightly redid it to allow for the use of the WIFI shield. I been able to get it up and running for both the UNO and YUN (I too am MODBUS illiterate!)
 

Similar Topics

Hello Everyone, I am using a raC_Opr_NetModbusTCPClient AOI module, as below,. So, I need some assistance to restrict in reducing the poling...
Replies
2
Views
72
I want to communicate my Q series PLC with Factory IO using GX works 2 software, I want to use modbus as server and the ips are as follows plc...
Replies
0
Views
62
Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
10
Views
318
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
119
Hi Everyone, i was hoping for a little help with this module. i have data that needs to be read from a different plc through the Modbus plus...
Replies
11
Views
283
Back
Top Bottom