Click Plus PLC MQTT Communication

preview_player
Показать описание
We will now look at the MQTT communication capability using our Click plus PLC. 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 which is ideal 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.
We will be installing a windows based broker called Mosquitto. The Click Plus PLC will be one of the clients publishing and subscribing to the MQTT broker. Node-RED will be the other client publishing and subscribing to the MQTT broker. Each client will share information. Let’s get started.

The Click Plus can only be programmed with version 3.00 or higher of the Click Programming Software. Version 3.00 will program all of the Click PLC CPU units and add additional features to the Click Ethernet CPU units.
Features of the new Click PLUS PLC (C2-0xCPU) includes the following:
• Micro USB
• DHCP support
• DNS support
• Wi-Fi (programming and Modbus TCP)
• Bluetooth (Wi-Fi) provisioning
• SD Card (Data Logging)
• Data Logger
• Network Time Service
• MQTT (Publish/Subscribe)
• Required PLC Password
• Disable Ports
• Strong Password Support
• Disable Ping Response
• Encrypted Password Transfer

More information can be obtained at our website. This includes all of the links mentioned in this video.

00:00 Click Plus PLC MQTT Communication
02:03 Eclipse Mosquitto - Open Source MQTT Broker
02:17 Installing Mosquitto Broker Windows
02:49 Mosquitto Broker Windows Service
04:08 MQTT Broker Configuration and Help
06:26 Node-RED MQTT Client
11:20 Click Plus MQTT Client
16:25 Click Plus MQTT Program

Previously we looked at the following:
Click Plus Software Installation
Click Plus Establish Communication

CLICK PLCs were designed with simplicity in mind, providing reliable control at a low, low cost and with little to no learning curve.
This simplicity makes CLICK a perfect solution for small machines, home automation projects, pneumatic applications, or anywhere a simple system needs a budget-saving control solution.
Building on the original CLICK’s simple design, the new CLICK PLUS PLCs offer the same practical control but with some surprising bells and whistles. Using the same FREE, streamlined PLC programming software as its predecessor, the CLICK PLUS PLCs provide no-headache programming combined with advanced capabilities like Wi-Fi communication and data logging.

The Click and Click PLUS PLC series can be found at this URL:

There are several reasons why we are using the Click and Click PLUS PLCs. Here are just a few.
- Investment is low for the hardware and the software is free
- Standalone PLC with built-in I/O
- Communication ability - Ethernet Port, RS232, RS485 - support for protocols such as Modbus RTU, Modbus TCP, etc.
- Ability to expand the system with a variety of modules including RTD and Thermocouple inputs directly.

Рекомендации по теме
Комментарии
Автор

A most interesting video. I like the step-by-step walk through. MQTT is new for me. 😎 Thank you.

qzorn
Автор

Nice to play with but not enough subscribes and publishers to get serious with.

robdriver
Автор

cool, going to add this to my home automation. just ordered my Click! I really have been learning alot from your videos so thanks!

TheUnofficialMaker
Автор

Great video! This method only works as LAN or the mobile HMI app can communicate with the PLC from afar over cellular connection?

alizadeh
Автор

When I installed, it installed to the C drive. I've been attempting to follow along with your video but can't get past the command prompt instructions at about 3 minutes in. What could I be doing wrong? I'm running windows 11.

Traveltech
Автор

Any chance that you or someone else has done any work with utilizing the enable/success/etc bits? I have an application I'm working on, not quite to testing phase yet, but I only need to publish the data, and even then I only need to publish once every 24 hours (at the same time each day), and I need to reset the data to zero after it's transmitted. I was thinking to use RTC to set the enable bit, and use the success bit to copy 0.0 into all my DFs, as well as reset the enable bit. I'm not sure if this would work how I think it does because I've never used MQTT before, and this is even my first Click after coming from an OEM using exclusively AB.

Would this be done with the QoS? I think I saw that in a video for the Productivity line.

eternalphoenix
Автор

I subscribed because you helped James out! thank you Gary.

griff
Автор

I plan on using this with an air compressor to publish the compressors tank pressure to my mqtt broker so I know if the tank is full or not from anywhere.

daltonschrader
Автор

You should defiantly do a video on how to set up the Mqtt broker to node red along with the whole system

jamesalexander