Tag Archives: iiot programming

Node-RED Modbus TCP Handling Errors


Node-RED Modbus TCP can recover from communication errors automatically. Options are available to you the programmer to continue the Node-RED flow upon detection of these errors.

Broken Ethernet cable, Modbus Server power, and Node-RED Client offline are just a few of the errors that can occur on the industrial plant floor. Our Node-RED program must account for and be tested for each of these conditions.
We will be communicating Modbus TCP (Ethernet) to our Click Plus PLC. Using the catch node we will detect and display errors that may occur. Let’s get started. Continue Reading!

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 Spreadsheet Connection


We will now look at the connection to our SQL database using a spreadsheet application. Previously we used Node-RED to communicate Modbus TCP and RTU to our Click PLC and Solo Temperature Controller. The information collected from the controllers was then put into an SQLite SQL database.
Node-RED SQL Database Spreadsheet Connection
Spreadsheets like Excel are great for analysis of the data. We will be connecting to our SQLite SQL database with WPS spreadsheets. This will be accomplished by using an ODBC driver as the translator between the database and spreadsheet. Let’s get started. 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!