# An Open Source Framework Approach to Support Condition Monitoring and Maintenance
## 5 The Solution
### Monitoring of Industrial Machines  
The current section outlines a case study that adopts the architecture presented in Figure 5 to monitor industrial machines, gathers and transfer sensor data with the support of an efficient message-oriented middleware, which is responsible for the transport of data to the Time Series databases and to a Mimosa database/s, from where the data can be analyzed. This case study focuses on a metal sheet bending machine of commercialized by ADIRA. The machine is a mixed construction that is powered by both a hydraulic and electric system. The hydraulic drive contains two cylinders placed on a combination of bars that serve as actuators. These actuators move a ram vertically up and down onto a kick on the machine's base. The ram holds a punch. The workpiece is put between the punch and the pass on, acting as clamps, so that it can be distorted. The system architecture for this system is divided into two main parts. One is the local network hosted on a machine within the factory, and the other is on the cloud. This cloud also exposes a human-machine interface (HMI), accessible via the Internet. The components that compose the Local Cloud 1 are the press brake machine, the MANTIS-PC, the edge local, and a local, restricted capability, HMI. The press machine comprises several data sources, which extract data from its computer numerical control (CNC) and a safety programmable logic controller (PLC), and also from some other sensors which were specifically added to support the maintenance platform. The latter includes Arduino-based motes with accelerometers that monitor the ram for both acceleration and vibrations, and it is capable of detecting wear problems on the bending operations and on the mechanics of the ram system itself. The component called Edge Local mediates the communication between Local Cloud 1 (the factory) and Local Cloud 2 (the cloud). It acts as the OPC-UA client in the interaction with the OPC-UA servers located on the MANTIS-PCs. This component also performs the pre-processing of the collected data, and it exposes the only connection towards the cloud using the Advanced Message Queuing Protocol (AMQP) protocol and the facilities provided by the Arrowhead inter-cloud communication support. Some CBM capabilities are provided locally by cloud 1, since it contains a Local HMI, which is a simple application that the user can use to view and monitor the information available in the factory, which comprises at least the raw data collected, and the pre-processed information computed by the Edge Local. Local Cloud 2 contains all the applications that perform high-level computation to support CBM. The cloud processes data from multiple factories, which were produced by local clouds in the factories and which were sent by edge local components. The entrance to Local Cloud 2 is through the edge server component, which receives the data from the edge local component and passes them to the number of applications executed in the cloud and that, together, compose the data analysis component. Moreover, both the data received by the edge server and the information composed by the data analysis component are sent to the visualization component (HMI component). The edge server component comprises a communication middleware, a MIMOSA complaint database module, and the communications server for the HMI. The primary purpose of the edge server component is to feed data to all other components in the cloud. The middleware, which is based on an AMQP event-based messaging bus, has a central role managing the data streams from the factories, by storing and transporting the data between the edge local, the data analysis and HMI components. The data analysis components include a set of three modules. The prediction models are used for the detection, prognosis, and diagnosis of machine failures. The models are designed for a specific machine family or generic, which can be adapted to different machine families.