## 9 Discussion, Contributions, and Future Directions
### Potential Sources of Error and Recommended Countermeasures  
Although the system performed reliably under most test conditions, certain discrepancies between expected and observed performance measures (e.g., latency spikes or transient data loss) were detected. The following error sources proved most critical:  
1. Network Bottlenecks: High traffic peaks on the local network occasionally caused packet collisions, leading to short-term increases in latency.
2. PLC Scan Cycles: The scan time of older PLCs (particularly the S7-200) can vary depending on the active program logic, causing fluctuations in data arrival intervals.
3. Sensor Calibration: The Coating Thickness Device can exhibit measurement drifts over time if not recalibrated. This yields slight deviations from the nominal values stored in the knowledge model.
4. Synchronization Delays: When multiple data streams (Profibus, IBH Link S7++, OPC UA) merge, time stamp alignment can become inconsistent unless carefully managed via a unified clock source or synchronization protocol. Improvement Measures:
* Quality-of-Service Optimization: Reserving a dedicated bandwidth segment for real-time data transmission and enabling priority queuing can minimize collisions under peak loads.
* Regular Calibration Cycles: Automating sensor calibration--especially for the coating measurement device--helps maintain data accuracy over long operating periods.  
* Time Stamp Normalization: Introducing a master clock reference (e.g., via NTP) ensures that all incoming data streams are properly synchronized, reducing the risk of misaligned signals in the post-processing phase.  
In many cases, simply reducing the sampling rates (e.g., from 50 Hz to 30 Hz) in low-variance process phases helped avoid network saturation. Over time, a data-driven adaptive sampling mechanism could automate this trade-off between resolution and throughput, further improving robustness and accuracy.  
Conceptualization, E.R.; methodology, E.R.; software, E.R.; validation, E.R., M.W. and T.M.; formal analysis, E.R.; investigation, E.R.; resources, E.R.; data curation, E.R.; writing--original draft preparation, E.R.; writing--review and editing, M.W. and T.M.; visualization, E.R.; supervision, M.W. and T.M.; project administration, E.R. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Austrian Federal Ministry of Labour and Economy, the National Foundation for Research, Technology and Development, and the Christian Doppler Research Association.  
Not applicable.  
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to industrial confidentiality agreements.  
The financial support by the Austrian Federal Ministry of Labour and Economy, the National Foundation for Research, Technology and Development, and the Christian Doppler Research Association is gratefully acknowledged.  
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.