We will now be installing the Node-RED software on our Windows 10 computer. Node-RED is a powerful and easy programming tool that will allow you to join together hardware devices, APIs (Application Programming Interface), and online services. This joining of information is part of the smart factory. Internet of Things (IoT), Industrial Internet of Things (IIoT), Industry 4.0, and Smart Production are just a few of the other labels that have been applied to this type of technology.
Node-RED provides a browser-based flow editor. This provides an easy way to visually see and modifies your program flow. Flows can then be deployed to the runtime in a single click. Node-RED is built on Node.js. This lightweight runtime can be deployed on low-cost hardware (Raspberry Pi ) or cloud services (Microsoft Azure). This has the ability to bring data collection, analysis, and storage closer to the actual device. Real-time edge computing can then be achieved without latency issues.
In this series we will be using Node-RED in some of the following ways:
– Connect to our industrial equipment using the Modbus protocol.
– Display Information on a user interface, HMI, or dashboard
– Log information into a database
– View information in the database through spreadsheets such as Excel.
Let’s get started by installing Node-RED.
Supported Node Version for Node-Red
Node-RED requires Node.js to operate.
These are the current versions of Node.js that are supported by Node-RED. We will be using version 12 because it is recommended. This will be a stable environment for our programs.
We will be installing version 12 of Node.js.
Currently, this version is in Maintenance mode. Download version 12.20.1 from the following URL: https://nodejs.org/dist/latest-v12.x/
Since we have a 64-bit windows 10 machine, select node-v12.20.1-x64.msi for the installation download file.
Double click on the file you have downloaded to start the installation of Node.js.
You will be presented with a welcome screen. Select next.
The end-user license agreement terms must be accepted before the installation will continue. Select next.
Choose the destination folder for the node.js program. Select next.
The custom setup window will now be displayed. We will leave the default values and select next.
We will select automatically install the necessary tools for native modules. Select next.
All of the information has now been set to install Node.js. Select the Install button to start the installation.
A status bar will be displayed as the software is being installed.
The completion message will be displayed after node.js has been installed. Click the Finish button.
Installing with npm
To install Node-RED you can use the npm command that comes with node.js:
Open a command prompt in windows and type the following command.
npm install -g –unsafe-perm node-red
The command will install Node-RED as a global module along with its dependencies.
At the command prompt type node-red. This will start the program.
The editor is browser-based. Open your browser and type http://localhost:1880/
The editor has four main parts; Header, Palette, Main Workspace, and Side Bar.
Watch the video below to see the installation of Node-RED on our Windows 10 computer.
Next time we will be using Modbus RTU and TCP to communicate with a Click PLC and Solo process temperature controller.
Watch on YouTube: Node-RED Installing the Windows Software If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII, and Floating Point. To get this free article, subscribe to my free email newsletter.Use the information to inform other people how numbering systems work. Sign up now. The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.