# Proactive Approach to Production Control Utilizing Heterogeneous Shop-Level Production Data
## 3 Methodology
### Utilizing the Transport Layer Communication  
A key focus is accessing raw production data from shop-level Programmable Logic Controllers (PLCs) and the communication protocols facilitating this data transfer to a control PC. For the purpose of this paper, we have considered communication protocols, which would allow us to gather the following data from the PrS in order to achieve our simulation goals:  
* Timestamped events: Recording the precise moment of occurrence for process-defining events within the production system, e.g., product entering a machine, start/end of an operation, etc. This is crucial for analyzing the sequence of occurring events, potential identification of production disruptions, and quality control [41]. * Product movement tracking: Monitoring the flow of products as they progress through the production line. This data can involve tracking individual items, batches, or pallets, and is essential for inventory management, identifying potential bottlenecks throughout the PrS and, lastly, process optimization. * Cycle time measurement: Determining the duration required for individual workstations or processes to complete their tasks. This specific type of data is highly valued during the process of creating a DTw for already existing and developed systems, as not all the data is available to the end user or documented in the PrS technical documentation [42]. This production data can be accessed in its raw state directly from the shop-floor PLCs. It provides a detailed and unfiltered view of the production process, minimizing data loss and maximizing accuracy. To facilitate the production data transfer from the PrS to the control PC and further to the simulation platform, we have considered the use of the following three communication protocols. The main criteria for choosing a suitable data transfer protocol were reliability and efficiency. * User Datagram Protocol (UDP)--a connectionless protocol that prioritizes speed over reliability. When using this method, data is transferred in packets without establishing a dedicated connection or ensuring its delivery to the designated receiver. While offering low latency, the potential for packet loss devalues the choice of this protocol for the resulting solution. Due to the requirements of a DTw fully integrated with the production system, any potential loss of transferred network packets is a significant drawback, as it can compromise the simulation accuracy and cause failed simulation runs, therefore possibly negatively affect subsequent decision-making. * Transmission Control Protocol (TCP)--a connection-oriented protocol that prioritizes reliability and data integrity. In order to ensure that the packets are delivered in the correct order and retransmit any lost packets, it establishes a connection between the sender and receiver prior to the data transmission process. As data integrity is a crucial part of a successful simulation when using a DTw, the reliability of this communication protocol makes it more suitable for acquiring production data from the PrS, mainly due to the overhead actions associated with the connection establishment and error checking capabilities. * Open Platform Communications Unified Architecture--the OPC UA protocol is a platform-independent, service-oriented architecture for industrial communication [43; 44]. It provides a comprehensive framework for data exchange, encompassing not only raw data but also metadata, security, and information modeling. Among the three communication protocols considered, OPC UA operates with the highest volume of data. This does not necessarily pose a problem, since modern network infrastructures can easily handle the required volume without noticeably affecting the speed of the data acquisition process. Figure 5 represents a topological layout of our established PLC network with a connection to the simulation platform through an OPC UA interface.