4.6 out of 5
4.6
131 reviews on Udemy

How to Program an Arduino as a Modbus TCP/IP Client & Server

Learn how to create your own Modbus TCP/IP Client and Server Device using the Arduino Uno Development System
Instructor:
Emile Ackbarali
704 students enrolled
English [Auto-generated]
Understand the Arduino Uno and Ethernet Shield from a Hardware persepctive
Connect an Arduino Ethernet Shield to an Arduino Uno
Connect an Arduino Uno to a Hitachi HD44780 LCD display
Use the Arduino IDE to develop applications for the Arduino Uno
Write an Arduino Sketch application to display messages on an LCD display
Write an Arduino Sketch application to implement a Modbus Client
Test an Arduino Modbus master using the Modsim32 Modbus server simulator
Write an Arduino Sketch application to implement a Modbus Server
Test an Arduino Modbus slave using the Modscan32 Modbus client application

If you work in the Automation Industry, you will know that automation equipment is very expensive. And many a time, especially for small applications, you simply cannot justify the use of very expensive equipment. 

This is where the Arduino comes in! 

The Arduino development board allows you to create very simple, but very powerful, Modbus client or server devices through the use of relatively simple “C” programming. With the Arduino, you have full custom control over the program design allowing you to create very lean and very efficient devices for very specific purposes. 

Put simply, mastering Modbus on the Arduino is going to take your skill level and value in the Automation Industry to a whole new level. 

That is what this course is going to do. At the end of the course, you will know how to:

1. Choose the appropriate Arduino hardware.

2. Interconnect Arduino hardware with other add-on hardware.

3. Write “C” applications to implement Modbus master and slave functionality.

4. Use software and hardware to test each application that you write.

All of the programs written in the course are freely downloadable and give you a perfect starting point for further development. At the end of the course, you will have the knowledge to create your own products, your own custom Modbus client and server hardware.

Looking forward to seeing you on the inside!

Introduction

1
Introduction
2
Adjust This Setting For Best Video Quality

The Hardware We Will Be Using

1
The Hardware List

The hardware that is used in the course is listed and their purpose given

2
The Arduino Uno

An overview of the Arduino Uno.

3
The Ethernet Shield for Arduino Uno

An overview of the Ethernet shield for Arduino Uno.

4
Network Connection Overview

An overview of the simple network connection we will be using in all examples.

5
Hardware Setup on my Workbench

A look at the physical hardware set up.

The Software We Will Be Using

1
The Arduino Programming Software

This lecture shows where to go on the web to download and install the free Arduino programming software.

2
The Modbus Libraries

Modbus libraries are used to simplify the implementation of the Modbus protocol on the Arduino.

3
Modscan32 and Modsim32

Modsim32 is a Modbus TCP Server simulation application. Modscan32 is a Modbus TCP Client application.

Quick Start - Creating our First Arduino Modbus TCP Server Application

1
A look at the Programming Software - Arduino IDE

The Arduino IDE is briefly introduced.

2
Our First Program - Testing Serial Comms

An application is written to send the words "Hello World" serially to the serial monitor.

3
Using Serial Comms to display the value of a Variable

The code is modified to display the value of a variable via serial comms.

4
Additional Code to support Modbus TCP Server Operation

Additional code is added to send data values serially only when there is a change in those values.

5
Adding Code to Implement Modbus TCP Server Functionality

The libraries and code that implement the Modbus TCP Server functionality are included in the application.

6
One Last Change Before Running the Arduino Sketch

An edit is made to the ModbusIP.h to ensure that the TCP connection is maintained.

7
Running our First Arduino Modbus Server TCP Application

Using the laptop with Modscan32 as a Modbus TCP Client, the Arduino application is run and tested.

Extending the Arduino Modbus TCP Server Application

1
Adding Code to Read a Holding Register

Code is added and the application updated to be able to read a holding register.

2
Adding Code to Read an Input Status

Code is added and the application updated to be able to read an input status.

3
Adding Code to Read a Coil

Code is added and the application updated to be able to read a coil.

Programming the Arduino to be Modbus TCP Client

1
Understanding the Modbus TCP Client Operation

An overview of what will be done in the section is given and the goal in relation to the last two sections is given.

2
Configuring the Modbus TCP Client Library in the Arduino IDE

The Modbus TCP Client library is configured to be used in the Arduino IDE.

3
Removing the Modbus TCP Server Code from the Existing Application

The latest application from the last section is used with the code that implements the Modbus TCP server services removed.

4
Writing Setup Code to Support the Modbus TCP Client Services

Setup code is added to the application to configure the network settings and create the Modbus TCP Client object.

5
Writing the Code to Poll a Single Register in the Modbus TCP Server

Code is written to read a single input register from the Modbus TCP Server (Modsim32). 

6
Testing the Initial Modbus TCP Client Application

The Modbus TCP client application is tested - Modsim32 is set up with a single input register that the Modbus TCP Client will read.

7
Writing the Code to Read the Other Modbus Register Types

Code is added to the application to read a holding register, input status and coil.

8
One Last Change Before Running the Arduino Sketch

Removal of the acc = 0; line.

9
Testing the expanded Modbus TCP Client Application

The expaned Modbus TCP client application is tested - Modsim32 is set up with a single input register that the Modbus TCP Client will read.

How To Purchase My Other Courses for ONLY $9.99 Each

1
Bonus Lecture: Get Any of My Other Courses for $9.99 Each Using This Coupon Code
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.6
4.6 out of 5
131 Ratings

Detailed Rating

Stars 5
68
Stars 4
49
Stars 3
12
Stars 2
2
Stars 1
0
572089b26d3cf2eb030949bb38558faa
30-Day Money-Back Guarantee

Includes

2 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion