Why Is Node-RED Used for PLC IIoT Applications?

Learn how Node-RED helps develop IIoT applications for PLCs.
Node-RED IIoT Applications - thumbnail
Listen to this article

In today’s article, we will introduce you to Node-RED. Node-RED is a powerful programming tool that is quickly becoming the go-to method of building Industrial Internet of Things, or IIoT, applications for PLCs.

Using Node-RED, engineers are able to extract data from PLCs and other industrial hardware and push that data to the cloud for analysis and integration with higher-level software like machine learning algorithms.

If you are interested in learning more about how to build Node-RED applications then we suggest you check out our course Node-RED with WAGO PLCs.

This course shows you how to build a complete Node-RED application that interacts with a WAGO CC100 PLC and visualizes the PLC’s data on a web-based dashboard.

What is Node-RED?

Node-RED is a low-code programming tool for connecting hardware devices, APIs, and online services.

It was developed in 2013 in IBM’s Emerging Technology Services Group as a proof-of-concept for visualizing and manipulating mappings between MQTT topics.

The developers quickly realized that Node-RED was a useful tool that could be extended in many directions and, in September 2013, the project was open-sourced.

To this day, Node-RED remains an open-source project and is built in the open.

Under the hood, Node-RED is built using Node.js, a very popular JavaScript programming framework. Since it is built with a JavaScript framework, all of the programming in Node-RED is done using JavaScript.

In case you are not familiar with it, JavaScript is a programming language that is commonly used in web development. JavaScript is the programming language that is used to add interactivity to web pages.

JavaScript is a very popular programming language among IT professionals and GitHub, a software developer platform, has consistently ranked it as the number 1 programming language in the world.

One of the reasons why JavaScript is such a popular programming language is that it is quite easy for new developers to learn.

Node-RED Nodes

One of the reasons that Node-RED is popular for IIoT applications is that Node-RED is highly extendible.

The Node-RED community develops and shares nodes that can be used in flows to easily add complex functionality.

There are currently 250,000+ nodes that are available to use in your Node-RED projects to communicate using specific protocols, connect your Node-RED flows to cloud providers, and more. Whatever you need to do in a Node-RED project, there is probably a node available for it.

If you are curious, you can browse all of the available nodes by navigating to nodered.org and clicking on the Flows link. On the flows page, you can click See more to view all nodes and sort them by popularity or number of downloads.

Now that we have an introduction to Node-RED, let’s see how we can develop flows in Node-RED.

Programming in Node-RED

Node-RED is a flow-based programming tool. In flow-based programming, an application is built up of a network of nodes. Each node in the flow has a well-defined purpose - it takes data in, processes the data, and outputs the processed data.

The flow of data between nodes is defined by networks that connect nodes together.

Flow-based programming is easy to understand since the process is structured visually. A viewer can generally figure out what a flow is doing without looking at any of the underlying code.

Since flow-based programming doesn’t require much programming knowledge, it is accessible to a wider audience. If you can break a problem down into discrete steps, then you can probably assemble a flow to tackle that project in Node-RED regardless of your programming ability.

You build Node-RED flows in a web-based development environment. Since the development environment is web-based, you don’t need to install any software, other than a web browser, on your machine to get started.

Building flows in Node-RED is designed to be easy and the development environment has a drag-and-drop interface with a very low learning curve.

When you are programming with Node-RED, it is important to be aware that Node-RED is an event-driven framework. This is very different from PLC programming which has cyclic scan cycles.

Once you get used to it, programming event-driven applications becomes very intuitive and is generally what’s required for IIoT applications.

Conclusion

In this article, we explained what Node-RED is and how you can program IIoT applications using Node-RED.

If you want to learn how to build Node-RED applications, then we recommend that you check out our course Node-RED with WAGO PLCs.

This course was developed in partnership with WAGO. At the end of the course, you will get a certification from WAGO.

In that course, you will learn how to install Node-RED on a WAGO CC100 PLC, how to use a Node-RED flow to read and write a PLC’s IO points, how to exchange data between a Node-RED flow and a CODESYS application, and how to build a web-based visualization for a PLC using Node-RED.

Join the Top 1% of Automation Engineers

Start Your 7-day Free Trial

Learn from Industry Experts

Start your learning journey today!
With a 7-day trial, then 25/month
Start Learning For Free