How to avoid costly mistakes when commissioning a new production line?
Many production managers and automation engineers face a dilemma: how to implement a new, complex technological line without risking damage to expensive machinery and avoiding weeks of downtime caused by debugging PLC code? The traditional approach — testing the program only on the physical system — is becoming too risky and costly in 2026.
The solution to this dilemma is the digital twin — a technology that enables virtual testing of systems before purchasing a single bolt. An excellent example of the effectiveness of this method is the “mini factory” project developed by eng. Dawid Kempinski.
Eliminating bottlenecks and collision testing without losses
The primary challenge in designing intra-plant logistics is unforeseen collisions and material accumulation. Through full integration of physical controllers — e.g., Siemens — with the Factory I/O 3D simulation environment, it is possible to replicate the transport and sorting sections at a 1:1 scale. This controller is natively embedded within the TIA Portal environment, which significantly simplifies project management, configuration, and diagnostics. It communicates in real time with the virtual factory model via an Ethernet network using the S7 Communication protocol and the PUT/GET mechanism.
This configuration ensures that the digital twin is not merely a static animation, but a dynamic model operating on realistic physics — accounting for gravity, collisions, and actual actuator travel times. This enables:
- Verification of control logic under conditions nearly identical to real-world operation.
- Safe testing of fault scenarios and identification of bottlenecks.
- Optimization of conveyor speeds and manipulator motion sequences.
- Comprehensive management of the entire virtual factory’s operation.
As Dawid Kempinski notes:
“The use of simulation also allows for faster deployment and debugging of PLC programs, reduced automation system development costs, and safe testing of fault scenarios.”
The PLC controller reads the states of virtual sensors and sends control signals to actuators in Factory I/O, enabling verification of control logic under conditions nearly identical to real-world operation. In the world of automation, the ability to safely “crash” a virtual machine instead of physically destroying manipulators represents savings in the range of hundreds of thousands of zlotys.
Comprehensive process modeling — from CNC machining to high-bay warehousing
A common problem in many plants is the lack of synchronization between different production stages. Dawid Kempinski’s project addresses this through a rigorous division of the line into eight autonomous yet tightly synchronized sections:
- Raw material processing.
- Sorting and distribution.
- Assembly.
- Inter-section transport.
- Pallet delivery.
- Packaging.
- Transport to warehouse and buffer.
- Warehousing (Section eight).
A digital twin developed on the basis of this experience can cover the comprehensive product lifecycle across multiple industries — from raw material to high-bay storage.
The process begins in the raw material processing section, where CNC machining centers transform material into finished components (bases and covers), before moving to the sorting section. There, a vision sensor identifies product codes and directs them to the appropriate lines via sorting arms. The next stage is precision assembly using dual-axis manipulators, where components are clamped by positioning devices during the joining process.
A critical — yet often overlooked in planning — aspect is inter-section logistics. A dedicated transport section ensures proper spacing and synchronization of product flow before items reach the packaging phase. In parallel, thanks to a lift system operating on two levels, pallets with empty crates are delivered to the line.
The actual packing of products into crates is performed by three-axis linear gantries, operating in a strictly defined motion sequence. Before a completed set reaches the warehouse, it passes through a transport section with a buffer. The use of a turntable and a buffer zone is essential to eliminate pallet collisions and prepare them for smooth retrieval by the warehouse management system.
The final stage is section eight — a high-bay warehouse served by a pallet stacker crane. This is where algorithms such as “First-Fit” (first available slot) are implemented, managing 52 storage positions in a fully automated manner. The system not only optimizes space by placing new pallets in positions vacated by dispatched goods, but also efficiently manages the product retrieval process based on specified quantity and type.
By allowing the digital twin to simulate such a detailed, multi-stage flow, we are able to eliminate errors in inter-section transport and buffering logic at the conceptual stage, ensuring production continuity even under maximum load.
Code stability and SCL language
A frequent question among programmers is: how to maintain readability in complex operations? The key lies in software written in SCL (Structured Control Language), which enables mathematical and logical operations that cannot be clearly expressed in classical ladder logic.
The core of the system is the most extensive part of the code — the Hardware Group — which manages all executive sequences of the line. The full spectrum of the Siemens TIA Portal environment can be leveraged, organized into function blocks. This structure introduces impeccable order into the project and prevents errors arising from uncontrolled variable access.
The use of CASE OF instructions and precise step management within these blocks ensures full system determinism — every phase of motion occurs at a precisely defined moment, as confirmed by tests of individual elements of the control program as well as a final 30-minute continuous run of the entire system.
Working in this environment requires an analytical approach to design challenges, proper interpretation of technological processes, and the ability to implement control algorithms.
Virtual Commissioning — 90% risk reduction
Modern challenges give virtual commissioning a clear advantage over the risky and often costly traditional commissioning approach.
Dawid Kempinski’s methodology demonstrates that final testing in a virtual environment reduces the risk of collisions during physical start-up by nearly 90%. Research showed that while simulation may produce errors caused by hardware performance limitations (FPS drops or communication lag), the PLC controller logic itself remains stable and correct. As a result, the delivered code can be considered “battle-tested” across thousands of virtual cycles.
Dawid Kempinski concludes:
“The developed line operates automatically and almost autonomously, in accordance with the design assumptions, which confirms the correctness of the adopted design solutions and their implementation.”
By leveraging emerging market solutions for creating virtual environments — offering an ever-broader range of industrial components and advanced customization capabilities — it will become possible to build digital replicas of the highest level of detail. This will allow for a full and faithful recreation of even the most complex systems, making simulation-based projects the foundation for building modern technological workstations across virtually every manufacturing sector.
These solutions find direct application in the automotive and machinery sectors for precision assembly, in the FMCG and food industry for packaging and sorting optimization, and in pharmaceuticals, where vision-based product verification is critical. Furthermore, advanced warehousing algorithms make this model ideal support for modern logistics and warehousing (e-commerce), enabling digital throughput testing before any physical plant expansion.
Is implementing a digital twin worth it?

Adopting innovation in the industry of 2026 need not involve operational risk. The use of virtual environments revolutionizes the design process, offering a safe testing ground that serves as a foundation both for greenfield factory design and for scaling existing plants with additional automation modules.
The answer to the question of cost-effectiveness is unequivocal: yes, it is an investment that pays off on multiple levels. Investing in a digital twin avoids costly mistakes during new line commissioning and ensures the safety of the entire infrastructure — eliminating the risk of physical equipment damage, the repair costs of which could many times exceed the cost of the simulation itself. A key benefit is the ability to carry out advanced modifications and tests without any interference with the running production line, guaranteeing the reliability of individual modules without generating downtime.
As a complete engineering tool, the digital twin enables logistics optimization and rapid line changeovers without halting current production. Through rapid prototyping, the time-to-market for new products is significantly reduced, while software licensing costs represent only a fraction of the expenditure that physical prototyping and testing would entail. Ultimately, a digital twin is not only a financial saving, but above all, gained time and certainty of process continuity.
If you are planning to implement a digital twin in your plant, contact us — we will help you navigate this process efficiently and safely.












