Category Archives: Database

Omron PLC Node-RED Serial Communication


PLC manufactures have their own proprietary protocols. These methods of communication will allow you to program the controller. Other protocols will allow you to collect and log information from the programmable logic controller. Node-RED has the ability to read and write to the Omron controller using special protocol commands.
Omron PLC Node-RED Serial Communication
We will connect Node-RED to the Omron CP1H PLC. A serial RS485 interface will be used for communication to the industrial controller. We will demonstrate reading and writing using Host Link (C-mode commands) to the Omron PLC. 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!

Click Plus Data Logging – CSV File SQL Database


We will now look at the data logging capability using our Click plus PLC.
Data logging is the collection of data over time. This is usually used for data analysis at a later time. The amount of data (System Information) stored and the frequency of the storage will depend on your specific application.
Click Plus Data Logging - CSV File SQL Database
The hardware used to store the data is usually called a data logger. Using the information from our last post, the MQTT information collected (Temperature in Atlanta and Click Analog) will now be logged in two different ways. A micro SD card on the Click Plus will be used to store the data every minute in a CSV (Comma Separated Value) file. Node-RED will also be used to store the same data in a SQL database. Let’s get started on how to use these data loggers. Keep on Reading!