A Web-Service-Based Approach to Driving Industrial Machines

PLCs and programmable HMIs have run industrial machines for a long time. Operators are used to standard HMI (human–machine interface) panels such as the Delta DOP-107CV or Siemens panels, which in turn talk to the PLC (programmable logic controller) that drives the machine.

For simple machines with limited features, standard HMIs work well. As machines become more complex, they start to cause problems.

The challenges

  • Inflexible user interface. HMI suppliers provide a proprietary editor for designing operator screens. It works well for simple interfaces built by dragging and configuring standard widgets, but struggles with advanced, refined user interfaces. Third-party graphics libraries such as Qt/QML, LVGL, µGFX, GUIslice and GuiLite can do more, but they are complex and often need tuning for each screen size and orientation.
  • Portability. Such solutions are hard to move when either the underlying hardware or the touchscreen changes.
  • Code reuse. Operators often prefer to work from a desktop or laptop connected to the machine rather than a touchscreen on it. That means porting the same software from the embedded system to Windows.
  • Vendor lock-in. Supply-chain problems make portability important. If software moves easily between platforms, it can be switched to readily available hardware when needed.

A web-based architecture

Hardware

Single-board computers. Choose an SBC based on CPU, memory, storage, reliability, availability, cost and software and community support. Options at the time of writing (2022) included:

Board Processor Memory
Raspberry Pi 4 Model B Broadcom BCM2711, quad-core Cortex-A72 (64-bit) at 1.5 GHz 1, 2, 4 or 8 GB LPDDR4
ASUS Tinker Board S R2.0 / R2.0 Rockchip RK3288, quad-core Cortex-A17 at 1.8 GHz 2 GB LPDDR3
Khadas VIM3 Amlogic A311D, 4 × Cortex-A73 at 2.2 GHz + 2 × Cortex-A53 at 1.8 GHz 2 or 4 GB LPDDR4X, 16 or 32 GB eMMC
Banana Pi BPI-M3 Allwinner A83T, octa-core at 1.8 GHz, PowerVR SGX544MP1 GPU 2 GB LPDDR3, 8 GB eMMC
ODROID-N2+ 4 × Cortex-A73 at up to 2.4 GHz + 2 × Cortex-A53 at up to 2.0 GHz 2 or 4 GB DDR4
UDOO BOLT V3 AMD Ryzen Embedded V1202B, 2 cores / 4 threads at 2.3 GHz (3.2 GHz boost), Radeon Vega 3 Up to 32 GB DDR4 (dual-channel SO-DIMM, ECC supported)
Libre Computer Le Potato Amlogic S905X, quad-core Cortex-A53 (64-bit), Mali-450 penta-core GPU Up to 2 GB DDR3
ROCK Pi 4 Model C Rockchip RK3399, hexa-core (2 × Cortex-A72 + 4 × Cortex-A53), Mali-T860MP4 GPU LPDDR4 at 3200 Mb/s

Displays. Standard and touch displays are available from Waveshare and many other suppliers, in sizes from 3 to 10.1 inches and larger, with capacitive or resistive touch.

Connectivity. Most SBCs connect to the display over HDMI, which most industrial touchscreens support. Touch input is handled over USB.

Software

Front end. A framework such as React makes it possible to build user interfaces that standard HMI editors simply can’t. Building a complex interface that stays fast on a modest SBC takes experience, though; done badly, it leads to a poor user experience. On a touchscreen that should only ever run the machine software, Chrome can be run in kiosk mode.

Back end. The logic that drives the machine can be split in two. Hard real-time operations stay in the PLC, and everything else runs in a back-end server on the SBC, written in a simple, efficient language such as Go. The back end talks to the PLC over Modbus on RS-485, Ethernet or other interfaces. Sensors connect either directly to the SBC’s I/O pins or to the PLC, depending on their type and how critical they are.

Benefits

  • Portability. A Go back end with a React front end can be built for Windows, Linux and other operating systems, on x86 or ARM.
  • Code reuse. The same code runs on an SBC with a touchscreen on the machine and on a desktop or laptop connected to it, saving development and support effort.
  • No vendor lock-in. Because the code is portable, it can move to alternative hardware if a part becomes unavailable, too expensive or problematic.
  • Better user experience. Modern web front-end tools make rich, well-designed operator interfaces possible.
  • Industry 4.0. A capable SBC can act as an IoT gateway, collecting machine data, sending it to cloud servers, and enabling remote diagnostics and software updates.

Conclusion

A web-service-based approach is a powerful alternative to the traditional HMI. It is flexible, supports rich user interfaces, avoids vendor lock-in and enables Industry 4.0 features.

At MavelTec we build our products on architectures like this. Security is designed in from the start, and our focus is on modular, portable products at a sensible cost.

References

More from the blog

See your tests running on MavelTec

Tell us which material testing machine you use and what you test. We'll show you the software working on it, or talk through a retrofit.

+91 85950 35636

Visit usHoblix, 2nd Floor, Block A, Heera Tower, 4, Dichaon Kalan Rd, Shiva Enclave, Najafgarh, New Delhi 110043