Web service based approach to drive Industrial Machines
Introduction
PLCs and programmable HMIs have ruled the industrial machines for a long time. Operators working on industrial machines are used to interfacing with standard HMI (Human Machine Interfaces) like DOP-107CV from delta, 6AV21240 from Siemens etc. HMIs in turn interact with PLCs (Programmable Logic Controller) which drive the industrial machines.
For simple machines with limited features, the standard HMIs work just fine. But as the complexity of the machine increases, they pose several challenges.
Challenges
- Inflexible UI/UX: Companies supplying these HMI usually provide a proprietary editor software to design the user interface for operators. This works great for simple user interfaces as the HMI developers can easily drag-drop and configure the standard widgets provided by the editing software. But when it comes to advance user interfaces and more refined UI/UX, such HMIs with their generic editors begin to struggle. At this point, embedded system architects start to scratch their heads looking for solutions which can drive touch screens on one side and real time systems like PLCs and sensors on other side. There are a number of 3rd party libraries available for creating the desired UI/UX such as Qt/QML, LVGL (Light and Versatile Graphics Library), uGFX, GUISlice, GuiLite etc. But these are pretty complex and even require tuning w.r.t screen sizes and orientations.
- Portability: Such solutions are not easily portable when either the underlying hardware running these libraries changes or the touch screen changes.
- Code Reusability: Touch screen attached to industrial machines are not always comfortable to use and operators sometimes prefer working from desktop or laptops connected to these machines. Now imagine porting the same software from embedded system running the touch screen to desktop or laptop running windows operating system.
- Vendor Lock-in: Portability also becomes very important considering supply chain issues with underlying hardware. If a solution is easily portable, it reduces the risk of vendor lock-in with some specific hardware as the solution can be easily moved to other readily available hardware when needed.
Web Based Architecture
Hardware Options
Single Board Computers
Several options are available for SBC and one can choose a suitable SBC based on the factors like CPU, memory, storage, reliability, availability, cost, software support and community support. Following are some of the options:
- Raspberry PI 4 Model B [1]
- Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
- 1GB, 2GB or 4GB LPDDR4 (depending on the model)
- Asus Tinker Board SR2.0, R2.0, 2S etc. [2]
- Cortex-A17 Quad-core 1.8GHz processor
- Dual-CH LPDDR3 2GB memory size
- Khadas VIM3 [3]
- Amlogic A311D – x4 2.2Ghz Cortex A73, x2 1.8Ghz Cortex A53
- LPDDR4/X, 2GB RAM and 32GB eMMC
- Banana Pi M3 [4]
- Octo-Core 1.8GHz CPU, PowerVR SGX544MP1 GPU
- 8GB eMMC storage and 2 GB LPDDR3 memory
- Odroid N2+ [5]
- Quad-core Cortex-A73(up to 2.4Ghz) and Dual-core Cortex-A53 (up to 2Ghz)
- DDR4 4GiB or 2GiB with 32-bit bus width
- UDOO Bolt V3 [6]
- AMD Ryzen™ Embedded V1202b Dual Core/quad Thread @ 2.3ghz (3.2ghz Boost)
- 2x Ddr4 Dual-channel 64-bit So-dimm Sockets With Ecc Support Up To 32gb 2400 Mt/s
- AMD Radeon™ Vega 3 Graphics (3 Gpu Cu)
- Le Potato [7]
- Quad 64-bit Low Power Cores and Penta Core 3D GPU with OpenGL ES 2.0
- Up to 2GB DDR3
- RockPi 4 Model C [8]
- Mali-T860MP4 GPU and 64bit Hexa core processor
- LPDDR4 3200Mb/s RAM
- High-performance eMMC modules and more
+ many more
Displays
Several options are available for normal or touch screen displays. Most popular of them are from Waveshare [9] but there are several other players as well. These are available in various sizes, touch-types (capacitive or resistive) and users can choose them based on their product specific requirements e.g., 3 inch, 5 inch, 7 inch, 10.1 inch and many more.
Connectivity
Most of the SBCs connect to display-units via HDMI interface which is supported by most of the industrial grade touch screens (capacitive or resistive). Touch events are handled via USB based connectors.
Software Architecture
FrontEnd
React JavaScript can be used to create amazing user interfaces which are just not possible with standard HMI editor tools. Imagination is the only limit when it comes to designing such user interfaces. But designing and implementing complex user interface (using browser based programming languages) while running on a relatively less powerful SBC requires experience and in-depth understanding; otherwise it can lead to poor user experience.
In case of touch screen type display device where it’s preferred to restrict the user access to only one software which is controlling the machine, a kiosk mode running chrome browser can be configured.
BackEnd
The core business logic which will drive an industrial machine can be split two parts. The hard real time operations can be built inside PLCs whereas rest of the stuff can be handled by backend server running on SBC. Such server can be written in a simple, efficient and powerful language such as GoLang.
Backend servers can interact with PLCs over a number of interfaces like Modbus over RS485, Ethernet etc. Sensors can either be directly connected to SBC I/O pins or they can connected to PLC depending on the type and criticality of the sensor.
Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.
Benefits
There are several benefits of this architecture:
- Portability: It’s relatively easy to port such solutions to different architecture and operating systems. For example a backend server written in GoLang with Reach Javascript frontend can be easily compiled to run on Windows, Linux as well as Android operating systems with x86 or ARM architecture.
- Code Reusability: As the same code can run on an ‘SBC + Touchscreen’ connected directly with machine as well as a desktop or laptop connected separately to the machine, it provides code reusability and saves a lot of time, effort, manpower as well as operational effort.
- Vendor Lock-in: As this architecture makes the code easily portable, it avoid vendor lock in. If once piece of hardware is not available, or its prices becomes in-feasible, or some critical issues appear using that hardware, we can easily migrate the code to alternate options.
- Awesome UI/UX: Web based architecture enables the use of very powerful frontend programming languages like React JavaScript. They can be used to create awesome user interfaces.
- Industry 4.0: Using SBC like powerful hardware can provide Industry 4.0 capability to the industrial machines. Such devices can act as IoT Gateways to collect meaningful data from machines, send data to the central or cloud servers and enable remote diagnostic, software updates and much more.
Conclusion
Web service based approach to drive industrial machines is a powerful alternative to traditional HMI based approach. It offers a lot of flexibility, provides powerful user interfaces, avoid vendor lock-ins and enables Industry 4.0 features.
At MavelTec, we design our solutions based on such future proof technologies and architectures. Security is baked into our products right from the design phases. Our focus always remains on creating world class products which are modular, portable and relatively low cost.
References
- https://www.raspberrypi.com/products/raspberry-pi-4-model-b/
- https://tinker-board.asus.com/series.html
- https://www.khadas.com/vim3
- https://wiki.banana-pi.org/Banana_Pi_BPI-M3
- https://www.odroid.co.uk/index.php
- https://shop.udoo.org/en/udoo-bolt-v3.html
- https://libre.computer/products/s905x/
- https://rockpi.org/rockpi4
- https://www.waveshare.com/product/raspberry-pi/displays.htm