Education is the most powerful weapon you can use to change the world.
—Nelson Mandela
Unless you've been living under a rock since the late '70's, you've probably heard about
Modbus, the communications protocol used
for a wide variety of industrial systems, from
sensors to
programmable logic controllers(PLCs).
Modbus can be found in most factories and automated assembly lines.
Modbus devices can be quite complicated; but what if we used
an embedded Device Tree to describe them?
That would enable the automatic discovery and configuration
of Modbus devices and peripherals, wouldn't it?
Modbus
Modbus is a communications protocol developed by Schneider Electric (nee Modicon) in the 1970's. Simple to implement, and robust in operation, it is used by a wide variety of manufacturers. Modbus is often associated with supervisory and data acquisition (SCADA) systems for process control. Manufacturing, power generation, refining, waste treatment plants, you name it, and you are likely to find Modbus devices installed there.
Modbus Addressing
![Modbus Address Map Modbus Address Map](/img/news/modbus/modbus-address-map.png)
Modbus Addressing with Device Tree
![Modbus Device Tree Modbus Device Tree](/img/news/modbus/modbus-device-tree.png)
In the past Modbus devices have usually required a very specific driver for each different make and model number of device, with little or no automatic discovery and configuration of Modbus devices being possible. Technicians would usually need to add each Modbus device to their supervisory and data acquisition (SCADA) systems manually.
Summary
Adding the Device Tree data structure to Modbus devices is pretty straightforward and simple, and enables the automatic discovery and configuration of Modbus devices and peripherals.
References, Footnotes, and more...
- Modbus Specifications
- Device Tree for Dummies - Thomas Petroni
- BeagleBlack Device Tree Tutorial - Adafruit
- Xilinx Device Tree Tutorial - Xillybus
- Altera Device Tree Tutorial - Xillybus
- ARM Device Tree Support - Ubuntu
- Altera Device Tree Support - Altera
- Index of Device Tree Bindings - kernal.org
- Device Tree Graphing - kernal.org
- libfdt - manipulating FDT Blobs - David Gibson
- Linux Bootloaders - informit.com
- Device Tree PnP - Eli Billauer
- Device Tree Overlay Manager - Pantelis Antoniou
- Device Tree Overlay Proposal - Grant Likely
- BeagleBlack Univeral I/O - cdsteinkuehler
- BeagleBlack Device Tree Overlay Generator - Kilobaser
- GPIOs on the Beaglebone Black using the Device Tree Overlays- derek molloy
- Supporting 200 Different Expansion Boards - elinux.org
- DT, The Disaster so Far - Mark Rutland
- Board File to Device Tree Migration - Pantelis Antoniou
- Device Tree Overlays - Jonathon Corbet