
Welcome learners to the Modbus primer course, and engage with the comment section to share insights, help others, and prepare for the next lecture on the data model.
Explore how fieldbus systems reduce wiring by enabling sensors to speak Modbus protocol, with the PLC reading values on demand, and Modbus history from 1979 including RTU, RS232/RS485, and TCP.
Explore the four Modbus data types: discrete inputs, coils, input registers, and holding registers, their bit or 16-bit lengths, and their read or read/write access, plus device combinations.
Explore discrete input as a one-bit digital input illustrated by two PLC push buttons. Modbus defines data length but not interpretation; one-bit values are straightforward, while analog values require manuals.
Explore coils as one-bit digital outputs in Modbus, enabling read and write access. Learn how a coil represents a relay's switching output and how a PLC reads its state.
Explore the Modbus input register, a 16-bit analog input (two bytes) with values 0–65535, and how manufacturer interpretation, such as 20°C or humidity readings, shapes the data.
Explore holding registers in Modbus Primer, 16-bit values with read and write access for analog outputs, and how the 0 to 65,535 range maps to 100% with manual clarification.
Modbus datapoints map to registers with a data type, size, and access, and manufacturers may organize them in one memory area or separate by data type.
Explore how Modbus represents data points, their length and access rights, and public function codes for reading and writing data.
Read coils with Modbus function code 1 and learn the request and response structure, including register, byte count, and bitwise status interpretation for multiple coils.
Read how function code two reads discrete inputs in Modbus, reading 1–2000 points from a register like 13, and interpret one-byte status where the lowest bit indicates a pressed button.
Explore how Modbus function code three reads holding registers, up to 125 at once, with 16-bit data, and learn to interpret valve values and percentage readings in request-response formats.
Use modbus function code 4 to read input registers, exemplified by a temperature sensor; the response returns function code, byte count, and two-byte values mapped to -25°C to 75°C.
Explore how Modbus function code five writes a single coil by sending a request with register 43 and a two-byte value, and verify the response confirms the coil state.
Demonstrates writing to an analog output with fc6 write single register. Shows converting 49,151 to 75 percent by dividing by 65,535 and comparing request and response fields.
Discover modbus function code 15, writing multiple coils in one request (up to 1968), with start register, coil count, byte count, and bitwise values.
Explain Modbus function code 23 for reading and writing multiple holding registers in one request, including an example with two PLCs and the response.
set up a Modbus rs-485 network with rtu, where a plc is the client and devices respond as servers; wire as a daisy chain with end resistors and biasing.
In the RS485 network, the plc sends a telegram with a unit id to a specific device, while others ignore it, ensuring unique 0–255 addressing to prevent collisions.
Coordinate Modbus RS-485 settings by mirroring baud rate, start/stop bits, and parity; slowest device defines baud, with 8 data bits and a stop bit, parity even, odd, or none.
Explore how a Modbus RS-485 network uses a daisy-chain topology to connect the PLC and servers with two connections for A and B and ground, minimizing branch lines and reflections.
Demonstrate reading a temperature and humidity sensor via Modbus RTU and writing the values to an LED display using a PC, Node-RED, and a USB-to-RS-485 adapter.
Node-RED acts as master, reading from temperature and humidity sensor 1 and writing to display 2 over USB RS-485, using 9600 baud, 8 data bits, no parity, 1 stop bit.
Explore how Modbus datapoints map to temperature and humidity readings and display settings, then learn which function codes read and write specific registers in a Node-RED workflow.
Set up Node-RED for Modbus communication by installing the Modbus palette, reading temperature and humidity via holding registers, and writing results to a display with a 1-minute poll.
Master the fundamentals of the tcp/ip world for modbus tcp, including ip addresses, ipv4/ipv6, subnet masks, dhcp, static ips, and mac addresses.
Learn how modbus tcp uses ip addresses and unit id to bridge to modbus rtu via a tcp/rtu gateway, which acts as a tcp server and an rtu client.
Explore a practical Modbus TCP setup with Node-RED as client and a server simulator, reading discrete inputs from registers 0–7 using function code 2. Verify with QModMaster and Wireshark.
Configure Modbus TCP with QModMaster and read eight inputs using function code 2. Inspect Modbus TCP requests and responses, including MBAP header, unit ID, and data decoding.
Build a node-red dashboard flow that reads eight discrete inputs from a modbus tcp device and displays their states with green and red ui.
Understand bit order in Modbus data by comparing LSB and MSB, how the data stream's bit values differ, and why the server manual matters.
Explore 32-bit floating point values in Modbus, using two registers, and learn how sign, exponent, and mantissa determine the value, with little and big endian byte orders.
Explore a real-world Modbus workflow by connecting with qmod master and Wireshark, reading input registers and floating-point values across two registers with big or little endian.
Read conductor voltage and total active power from an energy meter using Modbus TCP with Node-RED as client, via two requests to registers 4096–4101 and 4134–4135, using unit id 255.
Build a node-red modbus tcp flow to read power and voltage from an energy meter, decoding 32-bit floats with big-endian ABCD using the bytes-mod-pack-qt palette.
In this course about the Modbus protocol, we will begin by exploring the history of Modbus and its development over the years.
As we progress through the course, we will take a detailed look at the Modbus data model. You will learn how data is organized within Modbus devices and how different data types are accessed. The data model will be explained using practical examples to ensure that you not only understand the theory but also know how to apply it in real-world projects.
A major focus of this course is the understanding of Modbus Function Codes. Since Function Codes are at the core of every Modbus communication, we will dedicate an entire section to them. Together, we will examine the most important Function Codes, learn when they are used, and understand how they affect communication between devices. In addition, you will learn the difference between Requests and Responses and how Modbus messages are structured.
We will also cover the fundamentals of Modbus communication and explain how the Client/Server model operates. Building on this knowledge, we will discuss the differences between Modbus RTU over RS-485 and Modbus TCP over Ethernet. Furthermore, we will explore the most important Modbus RTU parameters, including baud rate, Unit ID, and biasing. By the end of this section, you will understand these concepts and know how to apply them in practice.
Finally, we will use Node-RED to put the theory into practice. Through hands-on examples, we will analyze how communication between Modbus devices works, which parameters need to be configured correctly, and how to troubleshoot common communication issues.