Node-RED for Industrial Applications

Phoenix Contact USA
4 min readMar 17, 2021

One of the main challenges of Industry 4.0 is coordination. Between edge-powered machinery, such as sensors and robotics, Industrial Internet of Things (IIoT) gateways, and hybrid clouds, today’s smart factories feature a lot of moving parts — and they all need to talk to each other. To maximize efficiency, we need to take a big-picture approach that emphasizes harmonious functionality.

Enter Node-RED, a self-described “low-code programming for event-driven applications.” Developed by IBM and currently maintained by the open-source community via its GitHub page, Node-RED is built on top of a Node.js / JavaScript tech stack. It uses a browser-based editor that abstracts away the underlying code to give programmer’s a high-level overview of their application’s flow, letting us easily see interactions, provision new resources in minutes, and strip away much of the repetitive coding tasks that go into linking application’s via their APIs and other similar tasks.

We can run Node-RED on the cloud or locally on a device as simple as a Raspberry Pi. When we combine this hardware flexibility with the software’s flexibility afforded by the over 225,000 modules in the package repository, it’s clear that this programming tool has a lot to offer the next generation of automation specialists and manufacturers.

Visual Orientation

The key trait that sets Node-RED apart from other IT languages is that it gives programmers a visual-first tool instead of only a text-based option. This has a few advantages.

First, it helps us to bridge the gap for IT/OT convergence. While Node-RED is rooted in Javascript and lets us program unique functions with code, it also bears resemblance to operational programming tools like ladder diagrams (LD) and flowcharts. OT professionals have used this schematic diagram for decades to program real-time control loops on hardware such as programmable logic controllers (PLCs), making the transition to Node-RED much easier.

Second, Node-RED’s visual orientation gives us a unique perspective on our production ecosystems. We can see where data is flowing, which machines are talking to each other, and if there are any bottlenecks or single points of failure (SPOF) that we need to look out for. It takes much less time to answer these questions when we can look at flows at a glance instead of reading through piles of code.

What this boils down to is that Node-RED lets us focus less on the code itself and more on the logic that the code represents. As industrial systems grow increasingly complex, this makes all the difference. It lets us maximize productivity, reduce downtime, and improve efficiency.

Node-RED for the IIoT

The applications where Node-RED really shines are in the IIoT. In a paper published in Procedia Computer Science, the authors “present a wireless industrial communication system based on Node-RED platform using Modbus protocol for smart factories,” which they claim is “able to help organizations achieve better benefits in industrial manufacturing markets by increasing productivity, reducing costs, and developing new services and products.”

In fact, Modbus is only one of the many industrial communication protocols supported by Node-RED. These options include MQTT, CoAP, AMQP, BLE, OPC UA, JSON Web Tokens, BACnet, and more. Basically, this means that instead of writing code for interfacing over these channels, we can simply drag and drop nodes into our flows and make some minor configurations in the graphical user interface (GUI).

This leads us to another one of the defining advantages of Node-RED: agility. While we usually think about agile development for software or web development, where we can easily spin up or tear down servers or programs with a few clicks, Node-RED is bringing this methodology to physical devices and the interactions between them. As Matt Newton writes for Automation World, Node-RED reduces “our exposure to software development and integration risk” by letting us “fail fast. Efficient application development requires engineers to prototype quickly and fail fast if an idea doesn’t pan out.”

For instance, we may want to pull data from a Modbus TCP device, store that data in an SQL database, and then send it up to the cloud for training a machine learning (ML) model. Node-RED lets us establish this pipeline in a fraction of the time of traditional coding, and, if it doesn’t work for any reason, then we stand to lose much less.

As a result, we’re able to drive innovation more rapidly. When taking a moonshot requires much fewer resources and therefore entails less risk, it’s much easier to get executive approval.

Conclusion

Whether we’re aggregating sensor data to run big data analytics, linking together diverse services through APIs, or orchestrating production lines down to the millisecond, Node-RED is already proving itself as a powerful tool for enabling the IIoT and Industry 4.0. And, since it’s an open-source project, we can expect it to continue to gain new functionality and receive prompt security patches as it grows.

Since the barrier to entry is so low, we recommend trying it out for yourself. Between the low hardware requirements and removing the prerequisite for advanced computer science know-how, Node-RED makes industrial automation easier, cheaper, and more accessible.

Published By Yuri Chamarelli

Originally published at https://www.linkedin.com.

--

--