Tag Archives: node-red flow programming

Simple Click Data Logging – Node-RED


We will now be looking at simple data logging using a Click PLC with an Ethernet port. Node-RED will be used to communicate to the controller via Modbus TCP protocol. Information collected will be then stored in an SQLite SQL database. A Raspberry Pi 4 single-board computer will be used for the Node-RED collecting and storing. The update time will be two times a second (500 mSec). This method is ideal for quickly determining how things are operating.

Analysis or display of the information will be done with a spreadsheet. The spreadsheet will be run on a windows computer. Let’s get started. Continue Reading!

Install Node-RED on Raspberry Pi 4


We will now be installing Node-RED on a Raspberry Pi 4 single-board computer. A static IP address will also be given for both the WiFi and Ethernet connections.
Install Node-RED on Raspberry Pi 4
The Raspberry Pi has quickly become a fixture in the industrial environment when utilizing the internet of things. (IoT) We will be utilizing this low-cost computer to poll and log information from our PLCs using Modbus and MQTT protocols. Node-RED will be the IoT enabling software that will allow us to utilize this hardware.
https://accautomation.ca/series/node-red-iot-enabling-software/
Let’s get started with installing Node-RED and setting up a fixed IP address on our Raspberry Pi 4 computer. Continue Reading!

Node-RED SQL Database Log – Modbus Logging


Node-RED can easily log data to a database. SQL (Structured Query Language) can be used to communicate to a SQL database. Databases separate analysis from the data unlike spreadsheets like Excel. The database is designed to hold more information than spreadsheets and allow multiple users to access the information.
Node-RED SQL Database Log - Modbus Logging
We will be creating an SQLite SQL database. SQLite Studio will be used to design the structure of the database. (Tables) Installing the node-red-sqlite-node palette will allow us to log the information from our Solo process temperature controller, Click PLC, and dashboard variables. Let’s get started. Continue Reading!

Node-RED User Interface – Dashboards


Node-RED can easily display interactive information to the user or operator using a web browser on your phone, tablet, or computer. Any device that has access to the network in which node-red is running.
We will be installing the node-red-dashboard palette. This allows us to create a live data dashboard user interface. (UI)
Node-RED User Interface - Dashboards
The information from our Solo process temperature controller will be displayed. Setpoint information can be set either by the dashboard UI or the Click analog input signal. This will be selected via the user interface. Let’s get started using Node-RED Dashboards. Continue Reading!

Node-RED Modbus RTU / TCP Communication


Node-RED can easily connect to industrial controls using Modbus communication. Modbus is a master-slave type of communication. Masters will always send the commands to read or write to the slaves on the network. The slaves will respond if the communication is directed at them.
We will be installing the node-red-contrib-modbus palette. This will allow us to communicate Modbus serial (RS485) RTU to a Solo process temperature controller. We will then use Modbus Ethernet TCP to communicate to a Click PLC.
Note: When using Modbus TCP (Ethernet) the master is referred to as the Client and the slave is a Server.
Node-RED Modbus RTU / TCP Communication
Node-RED will be used to create a single Modbus flow. We will communicate to our Solo process temperature controller using Modbus RTU on a serial RS485 network. The present and set values of the controller will be read. These values will then be written to our Click PLC using an Ethernet Modbus TCP network. A set value from an analog input on the Click will be used to then write to the Solo. This will happen every 200 milliseconds or 5 times per second.
Let’s get started using Node-RED for Modbus communication. Continue Reading!