MachineMetrics Blog

START DRIVING DECISIONS WITH MACHINE DATA.

Ready to empower your shop floor?

Learn More
Categories:

    PLC to Cloud: Using IoT to Read Data from a PLC

    The seamless integration of IIoT components including IoT hardware, software, and communication protocols has occurred in incremental steps for manufacturers.

    Early industrial automation systems were basic sensors, limit switches, and other devices that fed data directly to a printout or HMI where little to no analysis was available. Data still needed to be input into standalone software platforms at the management level. There were problems with interoperability between simple software and enterprise-level systems and a limit to the speed and depth systems could process data for consumption. Available visualization was usually limited to HMIs at the machine level.

    Since the 1970s, industrial automation systems have often relied on PLCs. Cloud platforms have advanced to the point that they’re designed to work with these PLCs under standardized protocols. PLCs can transfer data to the cloud platform. Data is analyzed and delivered to systems and people to improve productivity, spur process improvement, reduce waste, and offer actionable insights to users.

    The Lifecycle of PLC Data Collection.

    The PLC and the Cloud: What Are They?

    PLCs and cloud platforms are two distinct pieces needed for factory monitoring systems and IoT analytics platforms. They’re very different in application and depend on one another for a modern IIoT automation and monitoring system to work. Understanding their differences will help users understand how to send data from PLC to the cloud.

    Programmable Logic Controller (PLC)

    Programmable Logic Controllers, or PLCs, were developed for use in automation systems. Early models were capable of basic control functionality but had no advanced analytics or computational capabilities.

    They also lacked data structures, used proprietary programming that had to be done via laptop at the PLC cabinet, and were limited to a specific communication protocol.

    These limitations forced IT departments to create an in-house, ad hoc system of overlapping components, hardware, and device configuration to create a customized approach. These homebrew systems were open to security breaches, expensive to maintain, and had little IoT connectivity. They were generally out of reach for many small companies in which capital and skillset resources were scarce.

    Current PLCs can accept both OT and IT protocols. Most have built-in security or can be secured as part of an integrated IIoT platform. With advancements in capabilities, PLCs have also been empowered as edge devices that help move OT data to the IT-sphere, most commonly residing in a cloud platform.

    Type1 Light Toshiba PLC.A Type1 Light S - PUM11 CPU from Toshiba. [Source]

    The Cloud

    The explosion of data resulting from edge devices, advancements in PLCs, IoT technology, and other data acquisition devices presents an opportunity to gather data and harness it for value not previously available. However, the cost of adding physical servers, maintaining them, and keeping them secure could overwhelm many companies.

    The cloud represents the concept of decentralized data storage and access via the internet. Instead of managing company data in an on-premises server, data can be streamed to the cloud from multiple sources and stored remotely. Companies can also access advanced analytics platforms and services not available when hosting in-house.

    Data is stored, cleansed, organized, and analyzed via an internet connection with the cloud. The returned data (in the form of insights, calculated metrics, visualizations, or simply raw uniform data) are delivered via the internet to a terminal, laptop, tablet, or machine-level HMI.

    Learn More: A Manufacturer's Guide to Cloud Computing

    Why is it Necessary to Use a Cloud-Based Solution?

    The volume of data generated by devices at the point of generation can overwhelm traditional IT and in-house servers. Companies that try and maintain traditional systems will miss opportunities, lose data, or be unable to adequately analyze the data for use because they cannot store it all cost-effectively.

    With more and more manufacturing equipment being embedded with IIoT technology and advanced PLCs, this presents a competitive problem that is both practical and financial. PLC and cloud platforms make business sense.

    Using the cloud gives companies access to immediate software updates, significantly reduces expensive IT infrastructure costs and maintenance, and gives manufacturers access to advanced analytics and machine learning algorithms powered by AI.

    Cloud data solutions, such as MachineMetrics' Industrial IoT Platform, offer manufacturers significant benefits that improve multiple areas of their business, whether you are on the shop floor, or at home.

    Cloud Based Manufacturing Platform Collecting Device Data.

    PLC to Cloud: How to Read Data From a PLC

    Sending and updating data in the cloud is done by either implementing a standard protocol or using a cloud adaptor. This transmission is crucial for accessing data and user-friendly control from multiple sources such as HMIs, PC, laptops, and tablets.

    Implementing a Standardized Protocol

    The most common cloud protocol is MQTT. MQTT transfers messages back and forth between devices and is suitable for remote access over limited bandwidth. It commonly runs with TCP/IP but can run on any structured bi-directional connection.

    The MQTT protocol allows communication between a sensor or collection of sensors (MQTT clients) and an MQTT broker. The broker acts as a traffic cop, receiving all messages and routing them to the correct destination - such as another MQTT client, an edge computing device, or the cloud.

    The upside of using a standardized protocol such as MQTT is that it’s well known, structured, and allows simple movement to the cloud. However, configuring PLCs to MQTT is tricky, and data can be lost if a connection fails.

    Standardizing IoT Data into a Common Model.

    Making Use of a Cloud Adaptor

    In many types of factory automation, communication over local fieldbus protocols like Modbus, BACnet, and many others requires an IIoT gateway. They aren’t built for direct cloud communication, and opening a direct communication port would create security risks.

    A cloud adaptor collects all data onsite before transferring it to the cloud. Once the cloud connection is established, data is adequately encrypted and sent. Unlike a lost connection using the MQTT protocol, a cloud adaptor buffers data so it can be recovered if needed.

    What if you could easily connect your machine tools, PLCs, and sensors, autonomously standardize the data, and use out-of-the-box reports, visualizations, and workflows to take action? And no manual data tag mapping necessary?

    MachineMetrics is a machine data platform that enables plug-and-play connectivity to any manufacturing equipment and gives manufacturers the actionable insights they need to make better, faster decisions. Reduce waste, optimize processes, and unlock hidden capacity. Book a Demo Today.

    Steps for Sending Data from a PLC to the Cloud

    The value of real-time data in manufacturing is enormous. Analyzing data in a cloud platform using an advanced machine data platform such as MachineMetrics delivers actionable insights and greater value. However, getting data from many devices and PLCs to the cloud, and ensuring that it is standardized, is crucial for cloud-based platforms to work.

    Without a solution like MachineMetrics that can enable machine, sensor, and PLC connectivity, this process will have to be completed (and maintained) manually. You can take several steps to ensure the data from PLCs is delivered to the cloud platform correctly. These steps include:

    1. Creating Tags for PLC Data

    Data collected from PLCs must be strategically defined. This strategy includes creating tags for which data is collected and stored. These tags may include inputs from sensors for temperature, humidity, or other ambient conditions, including power usage or vibrational data for maintenance.

    MachineMetrics can conduct advanced analysis of data generated across equipment, enabling machine monitoring or driving advanced use cases such as predictive maintenance.

    Knowing what tags to use will help deliver relevant data that can be turned into action by systems, human interaction, or other automated processes.

    2. Preparing Required System Tools

    PLC to cloud communication in an IIoT system requires an internet connection. Internet access must be robust and powered by routers capable of handling a wide IP address range. It’s also essential to assess Ethernet connectivity as some devices have this connectivity while others may require an edge gateway.

    An Industrial IoT platform is needed to analyze and deliver insights to users once data begins pouring in. The MachineMetrics platform and devices work out of the box, allowing data analytics quickly after startup.

    3. Installing the PLC IoT Gateway

    MachineMetrics can connect and begin collecting data from PLCs and other devices in minutes. Companies can set up their industrial IoT gateway over the internet and add the appropriate router promptly.

    Without a connectivity solution like MachineMetrics, data tags would have to be manually mapped in order to standardize the equipment data. The MachineMetrics edge device makes this far easier to do thanks to the software on the device.

    PLCs can be accessed through the PLC software or by pinging the system to use a VPN connection. Once connected, data configuration is now possible for the PLC. MachineMetrics offers system flexibility and allows connection over EtherNet, Wi-Fi, and cellular, so access to PLC data is possible using multiple methods.

    MachineMetrics Edge Device within the cabinet.

    4. Setting Up a PLC Data Protocol

    PLCs require specific protocols to collect data. These protocols include the variables to be collected and where those variables reside.

    The PLC must first be configured using the manufacturer's programming instructions. They may also be programmed through the IoT platform's router. After configuration, each PLC's address is added, and the variables are selected for the data the PLC will monitor and collect.

    5. Configuring Variables and Tags

    At this point, the data has been defined and the connectivity has been tested. Variables can be added for each PLC, and tags can designate how each variable will be logged. Tags can be time-based to trigger action as needed, and they may also be based on condition change at the machine level. They can also be triggered based on information delivered to them via an MQTT broker from another PLC.

    6. Creating PLC Dashboards

    MachineMetrics offers rich visualization and dynamic, real-time dashboards. Out-of-the-box production displays can be real-time or historical and enable visibility into a plant's most important metrics. 

    The MachineMetrics platform also includes the capability for operator contextualization and direct input at the machine level. Many MachineMetrics apps can be configured and customized out-of-the-box to deliver a tailor-made experience in little time.

    7. Real-Time Monitoring and Proactive Alerts

    There is no substitute for real-time monitoring by a cloud-based IoT platform. Data received from PLCs and other devices is analyzed and insights are delivered, offering proactive alerts. These may indicate machine stops, impending problems, a lack of material, and more. Because these alerts are based on current machine status, operators and technicians can act quickly to reduce downtime and waste. Managers also have access to data that reflects the real-time status of the production floor.

    Connecting Several Devices to a Single Cloud

    Installing an Adaptor

    IIoT platforms can handle data from many devices simultaneously. But how do you get data from several different devices using different protocols? One example would be the use of a cloud adaptor like Raspberry PI.

    Raspberry PI is a tiny credit-card computer that can be plugged into an enclosure cabinet and programmed to act as a cloud adaptor to accept communication protocols from several PCs. Its small size, low power, and simplicity of programming help bridge the gap between PLCs and IIoT cloud-based platforms.

    Keep in mind: A solution like this will be incredibly resource-intensive to manually build and maintain. This is why automating connectivity and data collection across all equipment is so important. Selecting the right machine data collection solution creates a foundation for continuous improvement that not only can entire teams rely on, but also all other manufacturing systems, from CMMS to ERP.

    Collecting Local Data

    Once the cloud adaptor is installed, each PLC using a different protocol will need to be connected using the cloud service provider's web interface. Every IIoT commercial platform will provide a web interface via internet access. OPC UA is a popular standard because it works well with devices that support PLCs with proprietary protocols.

    OPC UA is used more often than OPC DA because OPC DA is less secure, doesn't allow the generation of alarms, and only deals with real-time data. In contrast, OPC UA allows access to historical data sources and the ability to set and trigger alarms.

    Designing Data Visualization

    Once local data collection has been enabled, PLC variables can be added to the dashboards. Once they’re added, they’ll appear on available visualization devices such as HMIs and will be included in data analyzed going forward.

    Using MachineMetrics to Collect and Analyze PLC Data

    PLC to cloud communication is a vital part of what enables IIoT to deliver value. MachineMetrics offers a powerful, flexible, agile cloud solution to turn PLC data into actionable insights that improve process control, lower costs, and increase efficiency. Easily connect machines, sensors, and PLCs to extract valuable production data so that people and systems can make better, faster decisions.

    Start putting your PLC and machine data to work with MachineMetrics. Want to see it in action?

    Plug-and-Play Machine Data Collection

     

    START DRIVING DECISIONS WITH MACHINE DATA.

    Ready to empower your shop floor?

    Learn More

    Comments

    Leave a comment

    Subscribe to our mailing list