# IIoT System for Intelligent Detection of Bottleneck in Manufacturing Lines
## 4 Experimentation
### Technologies Implemented in the Proposed IIoT Software Architecture  
Field devices and the edge tier:  
* In the simulation implementation, at the edge tier, the Plc-Data-broker component publishes and subscribes the information acquired from the PLCs through the MQTT engine. We used a Modbus service for the Schneider PLC and a web service using REST protocol for the Siemens PLC.
* The sparkplug-data-integrator component follows the specifications of the sparkplug framework [60], integrating MQTT data with specific topics for dataset identification and classification at the edge level. Additionally, the system incorporates a quality level using the \"data traceability\" component to save timestamps linked to the integrated data.  
At the platform tier shown in Figure 11, we will subscribe to the data published in the sparkplug-data-integrator to obtain a dataset with the information from the two sensors and their traceability. We will cover three objectives:  
* The first is the distribution and persistence of data integrated by the event streaming component in Apache Kafka [61; 62], arranged for the backend and Big Data.
* Second is the backend/microservices component interfaces with distributed real-time data, connecting with Big Data to utilize trained Machine Learning data. It sends new datasets to assess the risk of a bottleneck, with a microservice publishing risk indications at regular intervals. This synchronous REST client, scheduled every 30 s in the experimentation, facilitates continuous information capture by the Andon system in the enterprise layer.
* The data captured from the experiment are stored in two databases: SQL for information traceability and business, and NoSQL for Big Data DB ingestion, providing a historical and analytical data source. At the enterprise tier, we will have the most visual part of the architecture:  
Figure 10: Detail of the Fischertechnik model and control electronics, with PLC Siemens S7-1200 and PLC Schneider M221, used for experimentation.  
* The frontend for the proof-of-concept uses the angular single-page framework with the Node.js engine, enabling real-time updates and implementing the Andon system for monitoring.
* A simulated client system is implemented using Grafana 10 [63], connected to databases, to display a dashboard with key values. The dashboard triggers a review when the bottleneck alarm is activated, offering insights into data behavior. The platform allows interval-based updates, displaying trends over different periods. Additionally, the enterprise tier will feature an interface to connect to the NoSQL database with historical data from the Big Data system to analyze future trends and make decisions regarding the sensible dataset for bottleneck detection.  
The following diagram represented in Figure 12 shows a data flow diagram (DFD) with the interaction between the components of the IIoT architecture experimentation under a software engineering perspective.  
Figure 11: Implementation and technological components used in the proposed framework for experimentation.  
Figure 12: Data flow diagram (DFD) of the different software components in the IIoT architecture implemented for experimentation.