What happens when AI can test your machine software?
Kristian Thing Vangsgaard - neexo
CEO & Co-founder

This guest post comes from Kristian Thing Vangsgaard, CEO and co-founder of neexo.
Kristian has a background in industrial automation spanning roles as a technical advisor, product manager, and strategic sales leader. His focus is on strategy, sales, and customer relationships across neexo’s work in machine software, digital twins, and AI implementation.
neexo is a digital engineering company in Vejle, Denmark. It builds PLC software, HMI, AI solutions, and Unity-based digital twins for machine builders. neexo is a Unity Registered Service Partner.
Here, Kristian explains how AI and a Unity-based digital twin work together to test machine software.
AI can write and adjust Programmable Logic Controller (PLC) code. A digital twin can test that code against the modeled behavior of the machine. Put together, they give engineers earlier and broader feedback on machine software.
At neexo, we build this workflow for machine builders. We use Unity as the real-time 3D and physics runtime behind it. This post explains why the pieces work together, how the workflow runs, and where it stops.
Why machine problems show up so late
Integration errors can stay hidden until mechanics, software, and product flow meet on the shop floor. By then, a fix means a site visit, a delayed Factory Acceptance Test (FAT), or both.
Virtual commissioning can find those errors earlier. It means testing machine control software against a digital model of the machine before the physical machine exists. At neexo, we connect the real PLC logic to that model. Then we test sequences, faults, changeovers, and Human Machine Interface (HMI) behavior. The model comes from data the machine builder already has: CAD, signals, and machine behavior.
This is an established process. neexo has worked with virtual commissioning for several years across a range of PLC platforms.
Why AI needs a machine to test against
AI is able to generate PLC code quickly. But code that looks right is not necessarily code that works. A model cannot know whether a conveyor jams or a handover sequence deadlocks until something tests it.
A digital twin with physics in the loop closes part of that gap. Physics-based simulation adds another layer of verification by testing control sequences against the modeled physical behavior of the machine and product.
How the workflow runs: two testing stages
Our architecture combines AI-driven software development with testing in a Unity-based digital twin. It is designed to support an automated cycle of PLC code changes, software verification, simulation, and evaluation. The two testing stages have different jobs.
Stage 1: software verification. A dedicated agent is designed to work against the PLC code repository. It can check that the code compiles, meets the defined requirements, stays within permitted limits, and adds no regressions to the existing control logic. It also verifies sequences and processes.
Stage 2: physics-based testing in Unity. Once the Stage 1 checks pass, the workflow moves to the digital twin. The AI is designed to receive signals, events, measurements, and a test report from Unity, and to evaluate them against predefined acceptance criteria. This stage can show how PLC-controlled sequences interact with the modeled physical behavior of the machine and product.
Stage 1 verifies the software, including sequences and processes. Stage 2 adds testing against the modeled machine and product physics.
Engineers set the boundaries. An engineer defines the acceptance criteria and the permitted scope of PLC code changes, based on machine requirements and mechanical constraints. The AI works within that scope unless an engineer defines a different one.
The AI does not modify the Unity model, although it can suggest changes to it. An engineer must approve the software before it goes to the physical machine.
An illustration: the lifting sequence
The following scenario illustrates the intended workflow. It is not a completed customer case or a measured result.
Take a lifting sequence where a product does not clear a mechanical part of the machine. The lift height may be too low. Or the product may behave in a way that changes the clearance as it rises. For the digital twin to identify this issue, the model must represent that behavior.
The intended workflow handles it like this:
- The AI adjusts the lift height in the PLC code within predefined limits, reruns the simulation, and evaluates the result.
- It changes the control software, not the Unity model.
- If the fix needs a change outside the permitted limits, the AI refers the problem to an engineer.

A vacuum gripper lifts and places products in crates. Visual from Unity project, running a virtual FAT.
Why we chose Unity
Unity lets us combine physics, 3D, and PLC communication. That supports testing control software against the modeled behavior of the machine and product.
We developed the neexo Gateway to keep project-specific interface software outside the Unity model. When PLC hardware is replaced, the new communication protocol and I/O mapping are handled in the gateway, so the Unity model does not need a new version.
One model, more than one job
The twin does not retire after testing. The same model supports visualization, training, and sales.
Sales and training are particularly valuable together. Customers can see and understand a machine before it is built. Operators can practice sequences and fault scenarios without stopping production. Machine builders can also offer the model to their customers as a training or service solution.
What machine builders can expect
We expect shorter commissioning, fewer issues at FAT, and less engineering time spent on repetitive testing and adjustments. The workflow is designed to automate repeated tests and PLC code adjustments within defined limits. This can free up engineers to spend their time on more complex tasks.
Physics-based simulation also widens test coverage to include modeled physical interactions between the control software, the machine, and the product.
These are expected outcomes. We have no measurements to publish yet.
What this does not replace
Virtual testing can reduce risk early, but it does not replace the physical machine. Real-world tolerances, material behavior, sensor performance, and safety still need physical testing, as does functionality under actual operating conditions. A physical FAT remains necessary. The goal is to arrive at FAT with more problems already found, so the physical test confirms what only the physical machine can show.
How to get started
Do not start with the whole factory. Start with one sequence or challenge. To scope a trial, a machine builder should have:
- CAD data
- PLC code
- A description of the sequence to test
- The relevant requirements and acceptance criteria
- Any manuals or technical data about the machine or line, as background
With that in hand, contact us and we can define the scope of an initial trial together.



