7 Proven Steps to Build a Digital Twin
Building a digital twin doesn't start with choosing software. It starts with a question, a line, and knowing where that line's data lives.
The answer to “how do you build a digital twin” usually comes as a software checklist: pick a platform, add sensors, draw a 3D model. On the floor, things happen in a different order. A digital twin starts with a question you want answered, a line that carries that question, and knowing where that line’s data lives.
The seven steps below are the order we follow when we set up a line’s live digital twin.
1. Pick a question and a line
“Let’s build a digital twin of the factory” isn’t a good opening line, because it doesn’t say what success looks like. One question works better: “Why does this line miss its target?” or “Which stop reason costs us the most?”
The line that carries the question is usually obvious too. A good first line has three things:
- its data already flows somewhere,
- everyone knows its bottleneck, but not everyone agrees on the cause,
- its improvement can be measured in parts or in time.
Trying to cover the whole factory from day one delays the first result. A model that works on one line spreads to the next ones on its own.
2. Map the line’s data
The next step is seeing which data the chosen line produces, and where. Three signals are enough to start following a line live:
- machine status: running, waiting or stopped,
- cycle or production count,
- stop reason.
In most plants these are already produced in the PLC or SCADA layer. OPC UA, MQTT, MES, ERP, SQL databases and Excel files go on the map as well: work orders, shift plans, target counts and cost rates usually live there. We describe what each source tells you in Where Factory Data Comes From.
While mapping, most plants find they have more data than they thought. The new-hardware question usually closes here too: if the machines produce data, the job is getting it out.
3. Agree on what “stopped” means
This is the step most often skipped, and the one that causes the most arguments later. A value from a PLC means nothing on its own; the team decides what it means on the floor:
- When a press reports “waiting”, is it waiting for material, or is the operator on a break?
- Is a die change a stop, or planned work?
- Do breaks, planned maintenance and shift changeovers come off the target?
- When do shifts start, and is the plant open at weekends?
Until these decisions are written down, every OEE figure is open to debate: production trusts one number, maintenance another. Setting the definitions together at the start is what gets every later report accepted.
4. Build the line’s model
The model is the factory’s 2D plan and 3D scene: machines where they stand in the layout, lines and sections by their names. The aim isn’t a model as precise as an engineering drawing. A digital twin’s job is to show the floor’s data on the right machine. Where a machine stands and which line it works on matter more than its exact dimensions.
Physics-based models and scenario testing are a separate job: simulation is how you see how a line will run before it’s built. We explain the difference in Simulation or Digital Twin?
5. Connect every machine to its own data
Each machine in the model is connected, one by one, to the signal of its counterpart on the floor. It looks simple, but small mistakes happen here: a work centre can have one code in the MES and another in the PLC, and two similar machines can have their signals swapped.
After each connection, a simple check: when the machine stops on the floor, does it stop in the model? Does the count match the one on the machine’s own screen? A mapping error caught here doesn’t repeat in every later report.
6. Check the model against the floor
Once the connections are in, the model runs side by side with the floor for a shift:
- Are the stops the shift supervisor remembers on the screen, and do their durations match?
- Does the end-of-shift count match what was shipped or counted?
- Does the screen show what the operator sees?
Every difference is either a signal-mapping error or a definition gap from step three. Both get fixed at this stage. If the people who know the floor don’t trust the screen, the digital twin won’t be used, however good it looks.
7. Make the screen part of daily work, then extend
A digital twin creates value when people look at it every day. For that, everyone needs to know where to look:
- operators and shift supervisors, at the line’s current state and its stops,
- the production manager, at the shift’s and the day’s losses,
- management, at the week’s summary and the problems that keep coming back.
Once the first line has settled, the scope grows in two directions. In depth: as MES, ERP and cost data come in, losses turn from parts into money, and plan can be compared with actual. In breadth: the next line is added with the same definitions and the same way of connecting.
Our digital twin solutions page describes how we run these steps on site. You can see what the result looks like on the OnoTwin Studio page and in our demos, which open in the browser. To talk about your own line, write to us.
Frequently Asked Questions
How do you build a digital twin?
Start with one line and one question. Map where the line's data is, agree with the team what each machine status means, build a 2D/3D model of the line and connect every machine to its own signals. Run the model side by side with the floor for a shift and fix every difference. Once the screen is part of daily work, extend it to more data sources and more lines.
Does a digital twin need new hardware?
Usually not, if the machines already produce data. Machine status, cycle counts and stop reasons are ready in the PLC or SCADA layer in most plants, and the digital twin reads them. Extra sensors come up only when something you want to follow isn't measured at all.
How long does it take to build a digital twin?
Installing the software is quick: OnoTwin Studio is set up in half a day. What sets the timeline is whether the line's data can be read. Where the signals are and what's needed becomes clear in the discovery phase.
Does a digital twin need a physics-based model?
Not to follow a line and find its losses. A digital twin's job is to show the floor's data on the right machine. Trying out how a line will run before it's built is a separate job, and that's what simulation is for.