A PLC–Vision Bilateral Stage Consistency Verification Method for Virtual Commissioning of Discrete Assembly Lines
Abstract
1. Introduction
2. PLC Control-State Mapping and Virtual-Execution Synchronization
2.1. Physical-Line Modeling and Virtual-Model Construction
2.2. Structured Description of PLC Control States
2.3. Mapping PLC Control States to Virtual Actions
2.4. PLC–Unity Step Handshake Based on Action-Completion Feedback
2.5. Virtual Execution Stage Generation and Synchronization Performance
2.5.1. PLC Control-State Mapping Experiment
2.5.2. PLC–Unity Step-Synchronization Experiment
3. Machine-Vision Based Physical-Stage Perception
3.1. Physical-Workpiece Image Acquisition and Object Detection
3.2. Process-Region Partitioning and Stage Mapping
3.3. Generation of Vision-Derived Physical-Stage Events
3.4. Validation of the Vision-Derived Physical-Stage Perception Method
3.4.1. Object-Detection Experiment
3.4.2. Visual-Stage Event Experiment
3.4.3. Ablation Study of the Stage-Event Generation Strategy
4. System Integration and Comprehensive Virtual–Physical Consistency Verification
4.1. System Integration and Verification Procedure
4.2. Experimental Platform and Parameter Settings
4.3. Virtual–Physical Consistency Verification Experiment
4.4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Guo, L.J.; Wu, G.J.; Chen, H.J.; Chen, Z.Q. Design of Material Assembly and Sorting Equipment Based on NX MCD. Machinery 2022, 49, 68–75. (In Chinese) [Google Scholar]
- Zheng, K.J.; Dai, F.Y.; Lian, L. Virtual Commissioning of a Robotic Grinding System Based on NX MCD. Modul. Mach. Tool. Autom. Manuf. Tech. 2019, 57–60, 64. (In Chinese) [Google Scholar]
- Lin, Y.C.; Han, Y. Virtual Commissioning of CNC Machine Tools Based on NX MCD. Manuf. Technol. Mach. Tool. 2021, 151–156. (In Chinese) [Google Scholar]
- Lee, C.G.; Park, S.C. Survey on the Virtual Commissioning of Manufacturing Systems. J. Comput. Des. Eng. 2014, 1, 213–222. [Google Scholar] [CrossRef] [Scilit]
- Striffler, N.; Voigt, T. Concepts and Trends of Virtual Commissioning: A Comprehensive Review. J. Manuf. Syst. 2023, 71, 664–680. [Google Scholar] [CrossRef] [Scilit]
- Hoffmann, P.; Schumann, R.; Maksoud, T.M.; Premier, G.C. Virtual Commissioning of Manufacturing Systems: A Review and New Approaches for Simplification. In Proceedings of the 24th European Conference on Modelling and Simulation, Kuala Lumpur, Malaysia, 1–4 June 2010; Bargiela, A., Azam-Ali, S., Crowley, D., Kerckhoffs, E.J.H., Eds.; European Council for Modeling and Simulation: London, UK, 2010; pp. 175–181. [Google Scholar] [CrossRef] [Scilit]
- Tao, F.; Zhang, M. Digital Twin Shop-Floor: A New Operating Mode for Future Shop Floors. Comput. Integr. Manuf. Syst. 2017, 23, 1–9. (In Chinese) [Google Scholar]
- Tao, F.; Liu, W.R.; Zhang, M.; Hu, T.L.; Qi, Q.L.; Zhang, H.; Sui, F.Y.; Wang, T.; Xu, H.; Huang, Z.G.; et al. Five-Dimensional Digital-Twin Model and Applications in Ten Fields. Comput. Integr. Manuf. Syst. 2019, 25, 1–18. (In Chinese) [Google Scholar]
- Tao, F.; Zhang, M. Digital Twin Shop-Floor: A New Shop-Floor Paradigm Towards Smart Manufacturing. IEEE Access 2017, 5, 20418–20427. [Google Scholar] [CrossRef] [Scilit]
- Cimino, C.; Negri, E.; Fumagalli, L. Review of Digital Twin Applications in Manufacturing. Comput. Ind. 2019, 113, 103130. [Google Scholar] [CrossRef] [Scilit]
- Lattanzi, L.; Raffaeli, R.; Peruzzini, M.; Pellicciari, M. Digital Twin for Smart Manufacturing: A Review of Concepts Towards a Practical Industrial Implementation. Int. J. Comput. Integr. Manuf. 2021, 34, 567–597. [Google Scholar] [CrossRef] [Scilit]
- Puntel-Schmidt, P.; Fay, A. Levels of Detail and Appropriate Model Types for Virtual Commissioning in Manufacturing Engineering. IFAC-Pap. Line 2015, 48, 922–927. [Google Scholar] [CrossRef] [Scilit]
- Schamp, M.; Van De Ginste, L.; Hoedt, S.; Claeys, A.; Aghezzaf, E.H.; Cottyn, J. Virtual Commissioning of Industrial Control Systems: A 3D Digital Model Approach. Procedia Manuf. 2019, 39, 66–73. [Google Scholar] [CrossRef] [Scilit]
- Dahl, M.; Albo, A.; Eriksson, J.; Pettersson, J.; Falkman, P. Virtual Reality Commissioning in Production Systems Preparation. Procedia Manuf. 2017, 11, 2139–2146. [Google Scholar]
- Guerrero, L.V.; López, V.V.; Mejía, J.E. Virtual Commissioning with Process Simulation Using Tecnomatix. Comput. Aided Des. Appl. 2014, 11, S11–S19. [Google Scholar] [CrossRef] [Scilit]
- Basile, F.; Chiacchio, P.; Gerbasio, D. From Supervisory Control to PLC Code: A Way to Speed-up Constructive and Virtual commissioning of manufacturing systems. IFAC-Pap. Line 2020, 53, 466–471. [Google Scholar] [CrossRef] [Scilit]
- Leng, J.; Zhou, M.; Xiao, Y.; Zhang, H.; Liu, Q.; Shen, W.; Su, Q.; Li, L. Digital Twins-Based Remote Semi-Physical Commissioning of Flow-Type Smart Manufacturing Systems. J. Clean. Prod. 2021, 306, 127278. [Google Scholar] [CrossRef] [Scilit]
- Kusiak, A. Smart manufacturing. Int. J. Prod. Res. 2018, 56, 508–517. [Google Scholar] [CrossRef] [Scilit]
- Monostori, L. Cyber-Physical Production Systems: Roots, Expectations and R&D Challenges. Procedia CIRP 2014, 17, 9–13. [Google Scholar] [CrossRef] [Scilit]
- Leng, J.; Wang, D.; Shen, W.; Li, X.; Liu, Q.; Chen, X. Digital Twins-Based Smart Manufacturing System Design in Industry 4.0: A Review. J. Manuf. Syst. 2021, 60, 119–137. [Google Scholar] [CrossRef] [Scilit]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; IEEE: New York, NY, USA, 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; IEEE: New York, NY, USA, 2017; pp. 7263–7271. [Google Scholar]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; IEEE: New York, NY, USA, 2023; pp. 7464–7475. [Google Scholar]
- Noga, M.; Juhás, M.; Gulan, M. Hybrid Virtual Commissioning of a Robotic Manipulator with Machine Vision Using a Single Controller. Sensors 2022, 22, 1621. [Google Scholar] [CrossRef] [Scilit]













| Representative Approach | PLC/Control Logic | Virtual Model | Independent Physical Evidence | Role of Physical Evidence |
|---|---|---|---|---|
| 3D-model virtual commissioning [13] | Yes | Yes | Not used for stage verification | PLC/virtual-model commissioning |
| Process-simulation virtual commissioning [15] | Yes | Yes | Not used for stage verification | Process-simulation-based verification |
| Remote semi-physical commissioning [17] | Yes | Yes | Physical-system interaction | Remote/semi-physical commissioning |
| Machine-vision hybrid commissioning [25] | Yes | Yes | Machine vision | Vision used as closed-loop control input |
| Proposed method | Yes | Yes | Machine vision | Independent physical-stage events for bilateral stage consistency verification |
| Variable | Function |
|---|---|
| Step Index | Current PLC program stage index |
| Action Type | Action type, such as translation, rotation, or waiting |
| Object Id | Identifier of the target mechanism or workpiece |
| Axis, Target Value, Speed | Motion direction, target value, and execution speed |
| Action Finished | Unity object has completed the current action |
| Step Done | PLC confirming completion of the current stage and permitting advancement |
| Action Types | Tests | Success Times | Success Rate/% | Description |
|---|---|---|---|---|
| Translation | 152 | 152 | 100 | Linear-mechanism and workpiece-motion mapping |
| Rotation | 12 | 12 | 100 | Rotational-mechanism angle mapping |
| Waiting | 36 | 36 | 100 | Process waiting and cycle control |
| Total | 200 | 200 | 100 | Correctness of major action type mappings |
| Unified Stage | Representative PLC Boundary Action | Virtual Completion Condition | Physical-Stage Condition |
|---|---|---|---|
| Start | Initial process state/run start | Run start is initialized on the common time base | Workpiece center is stably confirmed in the Start region |
| Exec1 | Pressure-sensor positioning action | Boundary action completed and confirmed by the Action Finished–Step Done handshake | Workpiece center is stably confirmed in the Exec1 region |
| Exec2 | First conveyor-slider transfer | Boundary action completed and confirmed by the Action Finished–Step Done handshake | Workpiece center is stably confirmed in the Exec2 region |
| Exec3 | Second conveyor-slider transfer | Boundary action completed and confirmed by the Action Finished–Step Done handshake | Workpiece center is stably confirmed in the Exec3 region |
| End | Second lowering action of the finished-product transfer mechanism | Boundary action completed and confirmed by the Action Finished–Step Done handshake | Workpiece center is stably confirmed in the End region |
| Test Items | Metric | Results | Description |
|---|---|---|---|
| PLC reading cycle | Mean cycle (ms) | 300 | Cycle for Unity to read the PLC state |
| Unity action feedback | Mean feedback time (ms) | 174.86 | Time from action completion to feedback-variable write-back |
| Step-transition delay | Mean delay (ms) | 0.37 | Time from PLC feedback reception to entry into the next stage |
| Synchronization success | Successful transitions/total transitions | 100/100 | Ratio of stage advancement consistent with virtual-action completion |
| Item | Configuration |
|---|---|
| Detector | YOLO11n |
| Implementation | Ultralytics 8.3.9 |
| Initialization | Pretrained weight file: yolo11n.pt |
| Input size | 640 × 640 |
| Epochs | 100 |
| Batch size | 8 |
| Optimizer/learning rate | optimizer = auto |
| Inference platform | CPU |
| Metric | Result | Meaning |
|---|---|---|
| Precision | 0.8064 | Accuracy of detection outputs |
| Recall | 0.9689 | Detection rate for physical workpieces |
| mAP@0.5 | 0.9021 | Mean average precision at IoU = 0.5 |
| mAP@0.5:0.95 | 0.4369 | Mean average precision over multiple IoU thresholds |
| Preprocessing time | 1.5 ms | Per-frame preprocessing time |
| Inference time | 63.2 ms | Per-frame model-inference time |
| Postprocessing time | 0.6 ms | Per-frame result-postprocessing time |
| Statistic | Results |
|---|---|
| Valid runs | 30 |
| Manually annotated ground-truth events | 150 |
| Events output by the visual program | 149 |
| Correct events | 147 |
| False/missed events | 2/3 |
| Event-level Precision | 98.66% |
| Event-level Recall | 98.00% |
| Event-level F1 | 98.33% |
| Average event-generation latency | 104.21 ms |
| Method Setting | Correct | False | Missed | Precision (%) | Recall (%) | F1-Score (%) |
|---|---|---|---|---|---|---|
| Complete method | 147 | 2 | 3 | 98.66 | 98.00 | 98.33 |
| Without consecutive-frame confirmation | 149 | 10 | 1 | 93.71 | 99.33 | 96.43 |
| Without valid stage-transition constraint | 144 | 7 | 6 | 95.36 | 96.00 | 95.67 |
| Module | Main Configuration |
|---|---|
| PLC and simulation | TIA Portal V18; S7-PLCSIM V18 |
| Virtual platform | Unity |
| Virtual-branch communication | NetToPLCsim; S7.Net; TCP/IP |
| Visual acquisition | Two Hikvision industrial cameras, 1280 × 720, 30 fps |
| Detection model | YOLO11, input size 640 × 640 |
| Workstation-level controllers | Siemens S7-1200 PLCs |
| Central controller | Siemens S7-1500 PLC |
| S7-1200-S7-1500 communication | S7 communication |
| Central PLC–Unity communication | OPC UA |
| Servo/VFD communication | Fieldbus communication |
| Stage | Mean Virtual-Stage Time (ms) | Mean Physical-Stage Time (ms) | Mean Time Difference (ms) | Standard Deviation (ms) |
|---|---|---|---|---|
| Start | 998 | 1084 | 86 | 9.8 |
| Exec1 | 4998 | 5123 | 125 | 14.3 |
| Exec2 | 37005 | 37158 | 153 | 17.6 |
| Exec3 | 62997 | 63112 | 115 | 13.2 |
| End | 76010 | 76155 | 145 | 15.9 |
| Condition | Tests | Correct Decisions | Agreement with Predefined Condition (%) |
|---|---|---|---|
| Normal operation | 30 | 30 | 100 |
| Physical-state lag | 30 | 30 | 100 |
| Physical-state lead | 30 | 30 | 100 |
| Missing visual event | 25 | 25 | 100 |
| Invalid stage transition | 25 | 25 | 100 |
| Total | 140 | 140 | 100 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Liang, W.; Jia, H.; Zhao, X.; Li, Y. A PLC–Vision Bilateral Stage Consistency Verification Method for Virtual Commissioning of Discrete Assembly Lines. Machines 2026, 14, 1159. https://doi.org/10.3390/machines14101159
Liang W, Jia H, Zhao X, Li Y. A PLC–Vision Bilateral Stage Consistency Verification Method for Virtual Commissioning of Discrete Assembly Lines. Machines. 2026; 14(10):1159. https://doi.org/10.3390/machines14101159
Chicago/Turabian StyleLiang, Wei, Hang Jia, Xin Zhao, and Yuxin Li. 2026. "A PLC–Vision Bilateral Stage Consistency Verification Method for Virtual Commissioning of Discrete Assembly Lines" Machines 14, no. 10: 1159. https://doi.org/10.3390/machines14101159
APA StyleLiang, W., Jia, H., Zhao, X., & Li, Y. (2026). A PLC–Vision Bilateral Stage Consistency Verification Method for Virtual Commissioning of Discrete Assembly Lines. Machines, 14(10), 1159. https://doi.org/10.3390/machines14101159

