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?
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.
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).
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!)