Add a Mobile Dashboard + Alarm to Your PLC in 10 Min
by KimY21 in Circuits > Raspberry Pi
14 Views, 0 Favorites, 0 Comments
Add a Mobile Dashboard + Alarm to Your PLC in 10 Min
PLCs are the workhorses of industrial automation, but on their own they are nearly invisible — to see what one is doing, you usually have to stand in front of a wired HMI panel. In this project we give a PLC a mobile face. Using nothing but a Modbus connection and a handful of drag-and-drop blocks, we connect to a PLC, mirror its live process onto a dashboard you can open on your phone or any browser, push commands back to it, and get an instant alert when something goes wrong — with no port forwarding, VPN, or DDNS, and without writing a single line of code.
The example follows a simple pumped-tank process: a tank fills and drains, a pump keeps the level near a target set point, and the PLC exposes the level, the pump output, the demand, and a set of status flags. The moment the tank level drops to Low, your phone buzzes with a notification that tells you exactly how low it got. The same pattern — read values, write commands, raise an alarm — works for any Modbus register map, so once you understand it you can point it at your own machine.
Supplies
Hardware:
- A PLC that supports Modbus (RTU or TCP)
- Any device to run the project — Raspberry Pi 4+, Pi Zero 2 W, Windows PC, or Mac
- A smartphone for push notifications
Software:
- Grablo — No-Code IoT Platform (grablo.co)
Quick Start
Want to skip the build? Copy the project from the Grablo Gallery:
- Install Grablo on your device from grablo.co/download
- Get this project from the Grablo Gallery and click "Copy to My Projects"
- Edit the Modbus connection to match your PLC's IP, port, and register map
- Connect to your device and hit RUN
- Install the Grablo mobile app and log in to get push notifications
If you'd like to build it from scratch, follow the steps below.
Create the Dashboard
Create a new project, give it a name, and select your device, then open the Dashboard editor. The dashboard is where the PLC becomes something you can actually see and touch:
- Tank Level — a vertical Level Bar, set to 0–100% so the fill mirrors the real tank
- Pump Output — a Gauge, also 0–100%, for an at-a-glance read of how hard the pump is working
- Demand — a Label that shows the raw value with its unit
- Status lamps — five Lamp widgets for Low Level, High Level, Pump Running, Auto Active, and At Set Point (color the two alarm lamps red so they stand out)
- Auto and Pump Manual — Switch widgets that write back to the PLC
- Set Point — a Slider, 0–100%, so you can change the target level from your phone
Assign the matching variable to each widget, set colors and units, then drag to resize and arrange the layout. Build a comfortable mobile layout too — and don't worry about getting it perfect, because you can fine-tune everything later from the mobile app.
Set Up the Logic
This project uses one logic with two controls. The first control keeps the PLC link alive with an Always condition and four Modbus actions: write the Auto and Manual command coils, write the level set point register, read the process registers (tank level, pump output, demand), and read the status bits. Each action is a Modbus Function Code with an offset and length, and a variable mapped to every address.
The second control is the alarm. A compare condition watches the Low Level flag with the Rising Edge option, so it triggers only at the moment the level first goes Low. It then sends a push notification whose message is built to include the live tank level, telling you exactly how low it dropped.
Launch Your Project
Launch Your Project
- Open the Grablo app and select your project
- Connect to your device
- Hit RUN
- Open the dashboard on your phone or browser to monitor and control the PLC
Expected Results:
- The dashboard updates in real time as PLC values change
- Toggling Auto/Manual or moving the set point writes back to the PLC
- The lamps match the PLC's status flags
- When the tank level drops to Low, a push notification arrives with the current level — tap it to jump to your dashboard
Video Tutorial
Expand Your Project
Expand Your Project
- Add trend charts to log tank level and pump output over time
- Add a High-level alarm notification alongside the Low-level one
- Expand the register map to monitor more of the PLC's process
- Add email or Telegram alerts in addition to push notifications
- Connect multiple PLCs and combine them into one plant-wide dashboard
Troubleshooting:
- No Modbus data: verify the PLC's IP address and port, confirm its TCP Slave is enabled, and check that both devices are on the same network and not blocked by a firewall.
- Values look wrong or out of scale: re-check the Function Code, offset, and length against your PLC's register map, and confirm each variable is mapped to the correct address. A wrong Function Code is the most common cause.
- Writes have no effect: make sure the target coils and registers are writable and aren't being overwritten by the PLC program on every scan.
- Alarm never fires or fires constantly: confirm the alarm condition uses the Rising Edge option, and that the Low Level bit is mapped to the right discrete input.