Life would be so easy if there were only one PLC manufacturer, one Communication Protocol, and just one Cloud Solution.

Unfortunately, since this is not the case you'll want to find a solution that will cover as many different “constellations” as possible.

What do you need, and why should it be a Cloud solution?

Sensors, Meters, and PLCs provide a variety of data which today we want to monitor, record and display to users in the form of dashboards.

In fact, today's consumers expect to be able to use their smartphone or tablet to access important data from anywhere. They also expect push notifications to be sent if something goes wrong, as well as beautiful-looking data analysis to only a few clicks away.

All of this can be developed on-premises with great effort, or we simply use an existing Cloud solution that provides these capabilities out-of-the-box.

How do I get my data into the cloud?

Option A: Using a standardized protocol

There are not many standardized cloud protocols, however MQTT seems to be ahead in the race between MQTT and AMQP. These are both very simple protocols that enable the communication between sensor and broker.

MQTT requires low network bandwidth and is easy to understand. But since the payload of a “topic” is not clearly specified, many Cloud Applications will interpret these messages differently.

And for PLCs, MQTT is not very easy to develop, and if the connection fails the data cannot be recovered.

Option B: Using a Cloud Adapter

Typically, an IoT gateway is required whenever data is to be retrieved over a local field bus protocol, like Modbus, OPC-UA, BACnet, M-Bus, etc. These are not suitable for direct communication to the Cloud because they are master-slave protocols, and we never want to open a communications port in our firewall to enable a Cloud Communication.

Thus, a Cloud Adapter serves as a Data Collector on-site, establishes an encrypted connection to the cloud, and transmits the data without requiring a large amount of network bandwidth.

And if the Internet connection fails, all the data is buffered locally.

Option C:

When we program a PLC, we can also implement a direct connection from PLC to Cloud. For this we can use the mentioned standard protocol MQTT.

Siemens now offers a solution here. CODESYS also offers a library for this, but unfortunately it's not very cheap.

And a free alternative is the AnyViz Cloud adapter by Mirasoft (the company I work for.)

Demo case: Connecting different devices to one cloud

I'm with a customer who has an old Siemens controller installed in production. I'm extending the system with several Energy Meters (via Modbus) and installing another PLC that supports the more modern OPC-UA protocol.

OK, that does not sound easy, but I'm here to implement the Cloud Solution my company offers (AnyViz) because it supports all these protocols.

And for cost reasons I'm using a Raspberry PI as my Cloud Adapter, which nowadays are available in industrial enclosures.

Step 1: Installing Cloud Adapter on Raspberry PI

This step is explained quickly. Log in via SSH and execute this command:

  • wget -qO – http://install.anyviz.de | bash

Then I can open my browser and navigate the web interface of the cloud adapter.

Step 2: Collecting data locally

Since this application is using three different protocols, I have to create three connections in the web interface of my cloud adapter.

The fastest way to do this is with OPC-UA, because here I only have to specify the URL. For Modbus and Siemens I have to specify the register addresses (or block address) of each data point, which does take longer but after a few minutes this is done.

Step 3: Creating my data visualization

After registering in the AnyViz portal, I have to enter the project number in the Cloud Adapter and confirm the password. Afterwards, all data points of my local components will be listed in the Cloud Portal.

Using drag and drop, the data points can be configured into different visualization elements, and after about half an hour I've configured the following dashboard.

Push messages and emails are sent when any failure occurs, and the monthly report that the customer wants is also done quickly.

Conclusion

The internet offers us a variety of Cloud Solutions that make our lives easier. And we have the option of choosing between Standardized Protocols or Ready-Made and Optimized Solutions which I covered in the demo.

Written by Thomas Hepp
Passionate automation specialist at Mirasoft.de
Edited by Shawn Tierney

Have a question or comment on this article? Join our community to take part in the discussion! You'll also find all of our courses at TheAutomationSchool.com. (786 views)

Thomas Hepp
Latest posts by Thomas Hepp (see all)