In brief
Virtual commissioning means testing the software of a machine or line on a simulation model before the mechanics exist. The PLC program, running in an emulator or on a real controller, drives virtual drives, sensors and conveyors. Sequences, interlocks, error handling and communication with the MES are checked at a desk, and on-site startup shrinks to what the model cannot show: mechanics, wiring and tuning. It pays off most when test cases are automated and repeated on every program change.
What virtual commissioning is
In a classic machine project, the PLC programmer writes code from the documentation and runs it for the first time on the assembled machine at the customer's site or on the shop floor. Every sequence error then surfaces while everyone waits: the fitter, the electrician, the customer. Virtual commissioning moves that work earlier.
The simulation model behaves like the machine as seen from the controller: a cylinder extends within a set time after the signal, a limit switch changes state, a conveyor moves the part. The VDI/VDE 3693 guideline describes the types of such models and the terms used in virtual commissioning. In practice two setups are used:
| Setup | Controller | Model | When |
|---|---|---|---|
| software in the loop | controller emulator on a PC | simulation on the same or a second PC | early stage, logic tests, every programmer's daily work |
| hardware in the loop | real controller and operator panel | real-time simulation connected over an industrial network | late stage, timing, communication and hardware tests |
Hardware-in-the-loop tests are closer to reality but more expensive. They are covered in more detail in Embedded software and HIL testing. Virtual commissioning is also one use of a digital twin, as described in Digital twins in manufacturing.
The model: how detailed it needs to be
The most common mistake is building a more detailed model than needed. For testing control logic, a behavioral model is enough: input and output signals, motion times, sensor states. A physics model with dynamics and collisions is only needed for robots, grippers and motions that can collide.
The model is built from data that already exists in the project:
- The controller's I/O list with descriptions and addresses.
- The 3D model or kinematic diagram from the mechanical design, simplified to the moving parts.
- Motion times and drive parameters from datasheets.
- The description of sequences and machine states, which the programmer needs before writing code anyway.
When models come from different component suppliers, the FMI standard (Functional Mock-up Interface) helps: it lets you combine models from different simulation tools in one simulation.
What to test: the test case list
Virtual commissioning makes sense when there is a set of test cases, not just "let's see if it runs". A typical list for an assembly station:
| Area | Example cases |
|---|---|
| normal sequence | full cycle from part at the infeed to unloading, cycle time within the norm |
| operating modes | manual, automatic, step mode, transitions between them |
| interlocks | no part, door open, no air pressure, a motion forbidden during another motion |
| error handling | sensor does not change state in time, cylinder does not reach position, drive reports a fault |
| recovery | resuming the cycle, homing, removing the part |
| operator panel | alarm messages, access levels, recipes |
| communication | data exchange with the MES: work order number, test result, part counter |
Error handling and recovery deliver the most. On a real machine it is hard to trigger ten different sensor failures without risking damage. In the model you simply change a signal state.
Automation: regression on every program change
A single virtual commissioning run shortens one project. Automated tests on the model protect the machine for its whole life. The PLC program changes many times after startup: a new product variant, a timing fix, a new interlock. Every change can break something that used to work.
A test suite on the model works like regression tests in business software:
- The PLC program (in IEC 61131-3 languages) goes into a repository with change history.
- After each change, a server starts the controller emulator with the model.
- A script runs through the test cases: sets inputs, waits for states, checks outputs and times.
- The report shows which cases passed, and the change goes onto the machine only after a green result.
The same approach works for MES systems: virtual machines send events like real equipment, and regression tests do not need the line to stop. That is the project on automating MES testing with virtual machines. Building such tests is what our Test automation service does.
What virtual commissioning will not replace, and what the rules say
The model will not show mechanical play, wiring errors, interference, wear, or a sensor mounted two centimeters away from where the drawing says. On-site startup is still needed, but instead of hunting for logic errors the team checks mechanics and wiring and tunes parameters.
Safety functions need separate validation under functional safety standards. Virtual commissioning helps check their logic early, but it does not replace validation on the real machine. Regulation (EU) 2023/1230 on machinery, which applies from January 20, 2027, puts more emphasis on control system software, so documented program tests are increasingly valuable evidence in the technical file. More in The Machinery Regulation 2023/1230 and machine software.
Questions and answers
How much does virtual commissioning cost and when does it pay back?
The cost is mainly the work on the model and test cases plus simulation tool licenses. It pays back fastest on repeat or series machines, where the model is used many times, and on lines where every day of startup at the customer is expensive. For a one-off, simple machine the gain can be small.
Do you need a full 3D model for virtual commissioning?
No. For logic tests, a behavioral model with signals and motion times is enough. A 3D model helps with visualization and with robots, where collisions matter. Start with a simple model and add detail where the tests show it is needed.
Does virtual commissioning work with an existing machine?
Yes, for a retrofit or a program change. The model is then built from documentation and from observing the running machine. Program changes can be tested without downtime and loaded onto the machine only after passing the tests. This is especially valuable when the line runs three shifts.
Who should build the model: the machine builder or the plant?
Usually the machine builder, because it has the design data and the program. A plant that buys many machines can put the model and test suite into its purchasing requirements. It then gets a tool for safely testing its own program changes after acceptance.