Categories
Communication IoT Software MQTT Node-RED Open Devices PLC PLC Learning Productivity 1000 Productivity 2000 Raspberry Pi

Productivity PLC Node-RED MQTT – P1000 / P2000

We will use an MQTT broker in Node-RED to communicate to the productivity PLC clients. MQTT stands for Message Queuing Telemetry Transport. This simple ‘publish and subscribe’ communication protocol does not take too many resources.
Constrained devices with low bandwidth are ideal for MQTT. This protocol provides machine-to-machine (M2M) connectivity, perfect for the Internet of Things. (IoT) This protocol is not for remote IO or real-time (deterministic) applications. MQTT is a good solution for applications that move data from hundreds or thousands of machines (sensors) to clients in many networks.
Productivity PLC Node-RED MQTT - P1000 / P2000We will be installing and programming the AEDES MQTT Broker in Node-RED. A productivity P2000, P1000, and Node-RED will be the clients communicating to the broker. The PLC simulator inputs on each controller will control the outputs on the other controller. This will demonstrate the communication capability for publishing and subscribing to this IoT platform. Let’s get started.

Categories
Communication Database HMI HostLink Omron CP1H PLC PLC Learning

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.

Categories
Click Click PLUS Communication IoT Software Modbus TCP Node-RED PLC

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.

Categories
Click Click PLUS Communication Database IoT Software Modbus TCP Open Devices PLC Raspberry Pi SQL SQLite

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.

Categories
Communication IoT Software Modbus RTU Modbus RTU Node-RED Solo Process Temperature Controller surge

Waveshare USB to Serial PC Installation

We will be installing an industrial USB to RS485 converter on our computer. The Waveshare USB to serial port is a 2-wire USB to RS-485 serial communication adapter for RS485 use. It does not require an external power supply or complicated configuration.

It has a Type A (plug) USB connector for the computer side and screw terminals for the RS485 connections. This is an industrial USB to RS485 converter that has an FT232RL chip inside. It features embedded protection circuits such as lightning-proof, resettable fuse, ESD (Electrostatic Discharge) protection, and TVS (Transient Voltage Suppression) diode, etc. All of these features are packed within a small form size.

Purchase at Amazon.com
We will be installing the driver for this USB to serial converter and connecting it to our computer. Node-RED will be used to communicate Modbus RS485 protocol to a Solo process temperature controller. Let’s get started.

Categories
HMI IoT Software Node-RED Open Devices Raspberry Pi

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.