Introduction: Implementation of Modbus Protocol Modbus Read on Arduino Uno As Slave

About: Iam instrumentation and controls professional working in Emirates global aluminium (EGA) located at Dubai. I'm circuit designer and software developer by passion. Whatsapp (+91)9163954390

In this design I'm going to implement Modbus protocol on Arduino Uno. In this part I'm implementing Modbus read protocol. Arduino Uno is used as slave in this design.

Supplies

Bill of materials

  1. Arduino Uno board
  2. LEDs
  3. 1K resistor
  4. USB interfacing cable.
  5. Modbus testing software - ModbusPollSetup64Bit Download (modbustools.com)


Step 1:

In this design we are using Arduino Uno as slave. The protocol is implemented in Arduino Uno. PC has software installed as Modbus master. The Modbus ASCII protocol is used.The Modbus master will send a data frame to the Arduino slave.

An example Modbus ASCII data frame is shown below

:060100000006E3CRLF

':' Start of frame

'06' Address of slave (Arduino Uno)

'01' Read coil / Read input

'00' Address Hi

'00' Address Lo

'00' Quantity of coils high

'06' Quantity of coils low

'F3' LRC Longitudinal Redundancy Check

Formula = ((FF- (06 + 01 + 00 + 00 + 00 + 06))+1) = F3

Note: All additions done in hexadecimal.

Arduino Uno Port 2 to Port 7 data is analyzed and put in response data string.

The Software is attached.

This is a tested design.