Skip to content
2012 · 2026 In production

ModbusLab — virtual industrial automation laboratory

A Modbus teaching lab built as a PyQt desktop application in 2012, abandoned when the hardware it still needed became unavailable, and rebuilt in 2026 with no hardware at all.

ModbusLab in the browser: a Modbus message editor with station, function, address and data fields, link settings for framing, response delay and timeout, a frame console, and a monitor of the virtual Master-K120S PLC showing eighteen digital inputs and twelve coils with their register addresses.
The student composes the frame field by field against a virtual Master-K120S. The task panel on the left is the graded exercise, per-student variant, and it opens at 0 of 9.
ModbusLab frame console listing request and response frames in hex with their turnaround time, above the monitor of a virtual Carlo Gavazzi WM14 power analyser with line voltage and neutral current gauges, active and reactive power, power factor, and a three-phase bank of switchable loads.
Every exchange is readable as bytes — fn 04 polling at registers 0280h, 0298h and 02B0h, 40 ms apart — and the loads the student switches move the analyser that answers them. Both devices are simulated; nothing physical is involved.

The problem. Industrial automation is taught on equipment that is expensive, scarce, and sitting in one room. A student with an hour of lab time a week does not get to make the mistakes that teach the subject.

The first answer, in 2012. A PyQt desktop application driving the lab's Modbus devices. It ran for two or three course cycles and then stopped being used — because it had not actually removed the constraint. The software was on the student's machine, but the PLC and the power analyser were still in the laboratory, and when that hardware stopped being available the tool went with it.

The second answer, fourteen years later. The same idea rebuilt with the devices themselves simulated: a virtual Master-K120S PLC and a virtual WM14 power analyser served over the web, speaking Modbus. Nothing physical is required, so the laboratory is wherever the student is. My students are using it now.

What it demonstrates. Not persistence — diagnosis. The 2012 version failed for a reason I could name, and the rebuild is aimed at that reason rather than at the technology that had moved on in the meantime.