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

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
148
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
151
Dear All, i am trying to connect Danfoss inverter with s7 200 cpu 226.but microwin shows following error at DATA Ptr.i assigned different VB...
Replies
1
Views
46
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
221
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
252
Back
Top Bottom