Spec2Control Automating PLCDCS Control-Logic Engineering
Spec2Control Automating PLCDCS Control-Logic Engineering
Abstract 1 Introduction
arXiv:2510.04519v1 [[Link]] 6 Oct 2025
Distributed control systems (DCS) manage the automation for many A DCS is a computerized system that automates industrial equip-
industrial production processes (e.g., power plants, chemical re- ment used in manufacturing processes [22]. ABB has been a leader
fineries, steel mills). Programming the software for such systems in the 22 BUSD DCS market for 24 years, having installed more than
remains a largely manual and tedious process, incurring costs of 35.000 systems [2]. A large DCS may contain dozens of real-time
millions of dollars for extensive facilities. Large language models controllers, hundreds of servers, and control hundreds of thou-
(LLMs) have been found helpful in generating DCS control logic, sands of sensors and actuators [3]. The brain of such installations
resulting in commercial copilot tools. Today, these tools are fo- is the software, which reads sensor values and calculates actuator
cused on textual notations, they provide limited automation, and setpoints based on control logic written in domain-specific IEC
have not been tested on large datasets with realistic test cases. We 61131-3 programming languages [1, 52].
introduce Spec2Control, a highly automated LLM workflow to gen- Programming such systems is referred to as control-logic engi-
erate graphical control logic directly from natural language user neering and incurs high costs due to the induced manual labor [19].
requirements. Experiments using an open dataset with 10 control A mid-sized production plant may require more than a year of
narratives and 65 complex test cases demonstrate that Spec2Control control engineering from a team of 10 engineers [22]. Automation
can successfully identify control strategies, can generate 98.6% of engineers interpret prose text customer requirements and imple-
correct control strategy connections autonomously, and can save ment them in specialized programming environments [1, 22, 52].
between 94-96% of human labor. Spec2Control is being integrated Despite measures for reusing functionality across projects, this
into commercial ABB engineering tools, but is also available as an process remains tedious and error-prone and is one of the most
open-source variant for independent validation. significant cost factors for automation projects [19, 22].
Recently, automation vendors and researchers demonstrated
CCS Concepts the capability of modern large language models (LLMs) to gen-
• Applied computing → Computer-aided design; • Software erate IEC 61131-3 control logic from natural language specifica-
and its engineering → Automatic programming; • Computing tions [16, 33, 37]. This capability could automate parts of the control-
methodologies → Intelligent agents. logic engineering process. For example, the Siemens Industrial
Copilot [47], TwinCAT CoAgent [9], or B&R Automation Studio
Keywords Copilot [8] can create and explain IEC 61131-3 control logic using
chat interfaces. These tools are focused on textual notations and
LLM, Automation Engineering, Control Logic Generation, IEC
have not been systematically tested for large DCS projects so far.
61131-3, FBD, ST
The contribution of this paper is Spec2Control, the first end-to-
ACM Reference Format: end LLM workflow that generates graphical IEC 61131-3 function
Heiko Koziolek, Thilo Braun, Virendra Ashiwal, Sofia Linsbauer and Marthe block diagrams (FBD) directly from customer-written specifications.
Ahlgreen Hansen, Karoline Grøtterud. 2025. Spec2Control: Automating Spec2Control automates the control logic engineering process be-
PLC/DCS Control-Logic Engineering from Natural Language Requirements yond interactive chat sessions of previous engineering copilots by
with LLMs - A Multi-Plant Evaluation. In Proceedings of (ABB Corporate autonomously mapping customer specifications to control logic. It
Research Center). ACM, New York, NY, USA, 12 pages. [Link]
includes a dedicated context generation approach, a streamlined
1145/[Link]
pseudo-code LLM notation for graphical FBDs, and performs a
Permission to make digital or hard copies of all or part of this work for personal or
custom hierarchical auto-layout.
classroom use is granted without fee provided that copies are not made or distributed While we designed Spec2Control for commercial ABB engineer-
for profit or commercial advantage and that copies bear this notice and the full citation ing tools, we have extended its output generation to support open-
on the first page. Copyrights for components of this work owned by others than the
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or source tooling (OpenPLC [5]), enabling independent validation and
republish, to post on servers or to redistribute to lists, requires prior specific permission enhancement. Based on numerous commercial control narratives,
and/or a fee. Request permissions from permissions@[Link]. we have constructed an open dataset comprising 10 diverse control
ABB Corporate Research Center, Germany
© 2025 Copyright held by the owner/author(s). Publication rights licensed to ACM. narratives, which include 65 test cases for control logic. For these
ACM ISBN 978-x-xxxx-xxxx-x/YYYY/MM
[Link]
ABB Corporate Research Center, Mannheim, Germany
interlocks Koziolek et al.
90 IN1 OUT
IN2
2 Background I_LI_102_1
3 Spec2Control: Conceptual Approach LLM agents execute the first four steps under the supervision of a
Spec2Control’s goal is to automate the previously described control control engineer.
logic engineering process as much as possible, thereby reducing Step 1 (Planning): First, a planning procedure analyzes the
engineering costs. We first describe Spec2Control conceptually, control narrative provided by the control engineer to determine
supported by a running example, before sketching a prototypical a suitable chunking and processing strategy. In practice, control
implementation. narrative sizes span from only 1-2 pages to more than 500 pages, in
which case chunking is essential to avoid overloading LLM context
3.1 Running Example windows. Chunks are ideally self-contained, semantically coherent
sections mappable to individual diagrams. Often, the user-defined
Consider the control narrative of a chemical production plant that
sections provide a good template for chunking; however, in some
manufactures ammonium nitrate, a fertilizer. Section 2 of the control
cases, sections are ill-defined or need to be combined for coherence.
narrative describes parts of the desired automation for the included
Our current prototype supports 1) processing the entire document,
neutralization reactor, referencing 10 tags related to components
2) chunking by sections, and 3) chunking by user selection. Future
such as level transmitters, flow controllers, and flow valves.
additions could enhance the chunking strategy selection process
by utilizing LLM prompts and human revision. For the running
example, chunking by sections yields semantically coherent results
and is the selected strategy.
Neutralization Step 2 (Control Narrative Extraction): Based on the selected
Reactor VS
chunking strategy, this step extracts parts of the control narrative
107
and feeds them one by one to the subsequent workflow. The step
TIC
FT 103 also encapsulates the handling of different input file formats (e.g.,
PH
101 105 Word, PDF, and Markdown). The result of chunking is typically
2-3 paragraphs of text, possibly accompanied by tables and images.
FV-101 LT H
104 L Optionally, this step can run pre-specified LLM summarization
FIC
101
prompts on the chunk to strip excessive formatting instructions,
H
FFIC
102
redundancies, and overly verbose formulations. In practical cases,
L
FIC this can often reduce the chunk size by more than 50 percent, thus
102
preserving more context window space for later instructions. For
the running example, this step extracts Section 2 of the control
FV-102 narrative, which contains 3826 characters and 10 referenced tags.
Step 3 (LLM Context Generation): Before actually generating
control logic, Spec2Control establishes an appropriate context [39].
Figure 4: Running Example: Control Narrative Section on Context generation itself is a multi-step workflow with several
Neutralization Reactor in Ammonium Nitrates Chemical LLM prompts that gather 1) required function block definitions, 2)
Production Plant required control strategies, and 3) previously existing control logic
to connect to.
A typical control narrative chunk requires only a subset of the
Figure 4 provides a graphical P&ID of the text for illustration available library block types, and from these, only a subset of the
purposes in the context of this paper. This graphical representation available input and output parameters. Via LLM prompts on the
is not part of the actual specification and is not available to the current narrative chunk, Spec2Control identifies the required type
LLM for FBD generation, as it exclusively relies on text. Circles indi- definitions (e.g., PID_BASIC), which include function block name,
cate sensors, butterfly shapes indicate valves, and squares indicate input/output parameters (e.g., SP for set point), their types (e.g.,
control functionalities. The text describes a ratio control strategy BOOL, REAL, etc.), and descriptions (e.g., "setpoint for the PID
involving a ratio controller (FFIC-102) with two flow controllers control loop"). Retrieval-augmented generation [17] can support
(FIC-101, FIC-102) regulating the inflow valves (FV-101, FV-102) of this step, as shown in previous work [34], but this usually requires
the reactor. Interlocks, permissives, and alarm signals needed in the specially prepared source documents from a library repository. For
plant segment are also described and represented in the graphics example, the section in the running example requires, among others,
by dashed lines. A control engineer needs to map the described a function block type ANALOG_IN with input parameters for high
devices to matching function blocks from a library and then con- and low alarms to integrate the level transmitter LT-104 into the
nect and parametrize these blocks. The result will be an FBD. This DCS (Fig. 4).
task typically requires 1-2 hours of manual work per section and is The step selects a suitable control strategy for the given chunk
followed by extensive testing. from a list of pre-specified strategies. There are a dozen popular
control strategies, which already cover more than 95 percent of the
3.2 Control Logic Generation Method typical process control cases [27]. These include, for example, PID,
Fig. 5 illustrates the Spec2Control method, which begins with a cascade, feedforward, split-range, or duty/standby control. Func-
narrative and culminates in FBD control logic deployed on an au- tion block libraries support these strategies and induce specific
tomation controller. The method consists of seven steps, where block composition patterns, which this step loads into the context.
ABB Corporate Research Center, Mannheim, Germany Koziolek et al.
2 Control 3 Load
Control Control Identified Create Connections
Narrative LLM Context into
Narrative Narrative Control Strategy Context
Chunk Generation
Process Extraction Window
Loop
Parametrize
P&IDs
Selected existing Function Blocks
Retrieve
logic
supervise to attach to
Strategies: Create
1) extract section Interlocking Logic
unchanged Existing
2) summarize section with review supervise
Control Logic
LLM before passing
3) fact extraction Control Engineer
(e.g., for specific tags) Create Alarm Logic
deterministic,
Store / Retrieve no LLM
6 PLC
7 Function Block Create 5 Import Control Logic
Deploy logic Integrated Import Pseudo Code Validate Function
Runtime Diagram (XML) Pseudo Code
Development Conversion Block Diagram
Automation Controller Environment
Figure 5: Spec2Control Control Logic Generation Method: control narratives serve as input, are processed in seven steps by
LLM workflows and deterministic tools, resulting in control logic deployed onto an automation controller.
This information helps the LLM to determine the required func- notations. For the scope of this work, we focus on FBDs; previous
tion block connections for the narrative chunk. For cases where a work, for example, has demonstrated the generation of ST [33].
control strategy is challenging to detect or where a chunk includes Spec2Control divides the FBD generation into several steps, each
overlapping strategies, Spec2Control provides confidence levels for supported by individual LLM prompts, which enables focusing the
the possible strategy options. It optionally involves the human user LLM processing on smaller subtasks, thereby producing more reli-
in making a decision. For the running example, Spec2Control au- able outcomes. First, it instantiates block types and assigns them
tonomously selects the ratio control strategy, which here requires a names based on the tag names. Then it creates block instance con-
RATIO_CONTROL block and two PID_BASIC control blocks with nections according to the spec and the identified control strategies.
specific connections between the blocks, as it controls the ratio Parameters, such as alarm levels or setpoints, are added to the
between the two reactor inflows. blocks before two additional steps deal with interlocking logic and
Finally, step 3 also loads selected existing control logic into the alarms. Interlocks connect the states of two devices (e.g., a high
context. For example, function blocks may have already been instan- alarm causes a pump to stop). In contrast, alarms define thresholds
tiated in the control logic from previous generation steps, using so- for additional logic or human operator monitoring (e.g., a reactor
called bulk engineering tools, or through manual work. Especially temperature maximum of 190 degrees Celsius). Finally, a valida-
for extensions of existing automation systems, this step is crucial tion step receives the output of all previous steps and checks for
to enhance the existing implementation seamlessly. Spec2Control well-formedness and completeness using another LLM call.
searches in a repository of existing control logic based on the tag Spec2Control defines a streamlined pseudo-code notation for
names in the current narrative chunk, and retrieves related function FBDs, which focuses the LLM solely on outputting the essential
block instantiations and connections. For example, in the running instantiation, connection, and parametrization of function block
example, the PID_BASIC block for temperature controller TIC-103 types (running example in Fig. 6). This notation does not include
was already available. Therefore, the Spec2Control appends its def- graphical coordinates, sizes of function blocks, or coordinates for
inition with connections to the context, so that subsequent steps edge routing, as this information is added in a subsequent step
do not need to recreate the block. using an auto-layout algorithm. For the running example, the result
Step 4 (LLM Control Logic Generation): With the required of the control logic generation step is an FBD with 11 function block
context (i.e., block types, composition patterns, existing logic) in instances, three functions, 11 variable definitions, 32 connections,
place, the following workflow can now generate the actual con- and 24 parameters.
trol logic for the current control narrative chunk. There can be Step 5 (Pseudo Code Conversion & Layout): Spec2Control
different variants of the workflow, e.g., for the different IEC 61131-3 parses the pseudo-code notation, converts it into a data format
languages (e.g., ST, FBD, SFC), for IEC 61499, or vendor-specific required for the PLC IDE, and generates graphical coordinates for
Spec2Control ABB Corporate Research Center, Mannheim, Germany
command-line utility allows users to execute the steps unattended Using the generator, we created 10 non-proprietary control nar-
and process entire control narrative documents in batch mode. ratives across various industrial automation use cases to capture a
wide range of control strategies and required equipment. A large-
4 Case Studies scale industrial plant inspires each control narrative. Three of the
narratives originate from P&ID images, while seven narratives
A GQM (Goal-Question-Metric) approach [12] structures the evalu-
come from textbook seed texts. We ensured a detail level compara-
ation of Spec2Control. The goal was to determine the feasibility of
ble to commercial control narratives, which were cross-checked by
automated control logic generation from natural language specifi-
experienced control engineers. The control narratives comprise up
cations. Derived from the goal, we asked three questions:
to 10 sections, each spanning 1-3 pages, and collectively covering
(1) Question Q1: How many human interventions are required, more than 50 tags (sensors, controllers, actuators). Each section con-
and how complex are they? Derived metric Q1M1 counts tains a tag name table and describes the main control philosophy
the number of human interventions to produce FBD control for a plant segment (e.g., “vacuum distillation unit”) in prose text
logic for a given control narrative chunk. As metric Q1M2, referring to the tag names. Each section also provides subsections
we estimate the rework time required for generated FBDs for interlocks and alarms. The non-proprietary control narratives
resulting from erroneous LLM-generated content. As metric enable a transparent test setup outside corporate borders, which
Q1M3, we estimate the time needed for review and correction automation experts and researchers can validate.
to achieve confident semantic correctness.
(2) Question Q2: What is the quality of the LLM-generated
#Outputs
#Inputs
control logic? Notice that there are different ways to imple-
ment the functionality defined in a control narrative chunk. Name Type Description
Measures an analog value
For example, other naming conventions are valid, and the ANALOG_IN Sensor 8 4
(temperature, flow, …)
LLM may combine complex Boolean expressions in various Measures an boolean value (HMI
BOOL_IN Sensor 7 3
button, variable, …)
valid ways. To address this variability, we created a baseline Measures a digital sensor signal
DIGITAL_IN Sensor 5 2
of FBDs, reviewed by domain experts, to serve as a refer- (alarm switch, feedback, …)
Starts/Stops a motor (pump,
ence for evaluation. Since exact structural matches are not a MOTOR_ON_OFF Actuator
conveyor, …)
7 5
reliable indicator of correctness, we instead assessed each Starts/Stops a motor with variable
MOTOR_VSD Actuator 8 7
LLM-generated output using the following metrics compared speed (conveyor, mixer, …)
Operates an analog valve (flow
to the baseline: VALVE_ELECTRIC Actuator 9 5
valve, pressure valve, …)
• Q2M1: percentage of correctly identified control strategies Operates a digital valve (only open
VALVE_ON_OFF Actuator 6 6
or close, …)
• Q2M2: percentage of correctly instantiated function blocks Controls situations with primary
DUTY_STANDBY Control Strategy 17 8
relevant to the control strategy and secondary devices
Controls PID loops
• Q2M3: percentage of correct control strategy connections PID_BASIC Control Strategy
(proportional–integral–derivative)
15 4
• Q2M4: percentage of correctly configured alarm parame- Controls ratio situations involving
RATIO_CONTROL Control Strategy 13 3
PID controllers
ters
Controls split-range situations
(3) Question Q3: What is the cost/benefit ratio of an automated SPLIT_RANGE Control Strategy 9 2
with output to two actuators
vs. manual control engineering approach? Metric Q3M1 is Implements a voting logic unit for
VOTING_ANALOG Control Strategy 9 6
multiple sensor readings
the percentage of LLM construction time plus LLM-induced
rework time divided by the estimated manual construction Table 1: Function Blocks in BASIC_LIB library
time. Metric Q3M2 quantifies the average LLM costs to pro-
cess a control narrative chunk in USD.
We also analyzed more than a dozen ABB control function
Measuring the metrics on representative reference test cases helps
block libraries, which are used in different industry domains (e.g.,
assess the feasibility and usefulness of the approach, providing
metals, chemicals, power production, etc.) and in other regions (e.g.,
ABB control engineering units with data for initiating AI adoption
Europe, US, Asia). Often, these libraries contain 15-20 major func-
across worldwide engineering centers.
tion blocks with 50+ input and output parameters, in addition to
smaller supporting function blocks. Function block libraries are also
4.1 Test Setup proprietary and carry company-internal IP. Therefore, we defined
To collect data for the metrics, we analyzed dozens of control a new library (“BASIC_LIB”) inspired by the commercial libraries.
narratives from ABB automation customers in recent and past It contains 13 function blocks, which, for example, convert digital
ABB automation projects. These control narratives ranged in size and analog input signals, implement control algorithms, and steer
from 5 to 500+ pages or more and concerned various applications, valves and pump motors (Table 1). Each block defines up to 10
including offshore wind farms, wastewater treatment facilities, and input and 10 output parameters, along with their type and textual
power plants. Such control narratives are proprietary, about intel- description. While some commercial function blocks can have more
lectual properties, and thus, we cannot publish them. We therefore than 50 parameters, in many situations, control engineers only use
created an LLM-based control narrative generator that can synthe- a few of these parameters, while the others encapsulate special-
size realistic control narratives utilizing process descriptions from ized functionality. Therefore, the function blocks in the BASIC_LIB
textbooks or based on P&ID images. capture the most typical parameters, which cover 80-90 percent
Spec2Control ABB Corporate Research Center, Mannheim, Germany
of the usual functionality. For validation purposes, we defined the human input in some instances. Furthermore, the control narra-
blocks as OpenPLC user-defined blocks, allowing OpenPLC to in- tive texts were reviewed before FBD generation. In contrast, other
stantiate them. Besides the BASIC_LIB function blocks, our LLM control narratives may contain inconsistencies that require human
control logic generation workflow can also instantiate standard IEC intervention, including clarifications with the narrative’s author.
61131-3 function blocks, including, for example, boolean expres- An LLM could flag such inconsistencies before attempting FBD
sions, arithmetic calculations, or timers. generation.
We created a baseline implementation of the FBDs for the 65 The generated FBDs are complex and require careful inspection
sections of our 10 control narratives. Subject matter experts manu- at the moment. A PLC IDE can often already indicate obvious errors
ally reviewed these FBDs and verified their correct functionality (e.g., type mismatch in connections, or disallowed characters) to
and completeness. They found that the BASIC_LIB blocks could not the user. Mismatches in function block type names could prevent
explicitly address all specific details of the control narratives, such the IDE from instantiating them; however, in our tests, such mis-
as handling particular operator interactions via UI elements. Fur- matches did not occur. Therefore, we foresee the time for checking
thermore, they found that the BASIC_LIB interlock handling with syntactical errors of the LLM-generated FBDs as almost negligible
inhibit pins was slightly simplified compared to some commercial per FBD (Q1M2 ≈ 5 min).
libraries, but not unrealistic. The subject matter experts, however, Checking semantic correctness is challenging, especially with
did not consider these gaps as critical and focused on reviewing complex “glue logic” such as Boolean expressions, timers, and arith-
the main control strategy implementations and alarm logic. We metic. Human-crafted FBDs require functional checks through peer
then used this baseline implementation to compute the metrics reviews by control engineers. Based on tests, we estimated review
Q2M1-Q2M4 from test runs and to make the effort estimations for times for FBDs by complexity, allocating an average time per el-
Q3M1. ement (e.g., 1 minute per connection). Review times across the
The test execution comprised running the workflows for extrac- dataset ranged from 19.4 to 114.7 minutes per section, with a me-
tion, context generation, control logic generation, and pseudo-code dian of 42.8 minutes (Q1M3 = 42.8 min).
conversion. We used our CLI tool to run the tests in a batch style Fig. 9 provides an overview of all the control narrative sections in
against the entire control narrative dataset. OpenAI GPT-5 with our dataset. It illustrates the diverse range of production plants (e.g.,
auto-reasoning needed up to 1 minute for individual prompts and chemical, water, paper, steel) and the realistic segments within these
approximately 1 hour for a complete control narrative. After test ex- plants, presented in linear sequence across the different sections.
ecution, scripts computed the metrics Q2M1-Q2M4, whose results There is a mix of various control strategies, with “PID control” being
we manually reviewed. the most prevalent strategy, which aligns with experience from
practice. The statistics for the baseline FBDs indicate that the control
narrative sections required 4-20 function block instantiations and
4.2 Results with Open Dataset 3-68 connections per FBD.
For illustrative purposes, Fig. 8 shows an excerpt of an LLM-generated Fig. 9 depicts the measurements for Q2M1-Q2M4 to assess the
FBD for the running example described in Section 3. Due to space quality of the LLM output compared to the manually reviewed base-
constraints, we cannot display the entire FBD in this paper; how- line for each tested control narrative section. As there are different
ever, the full 65 FBDs for the complete dataset are available in valid ways to implement the narrative specifications in an FBD, the
the paper’s supplementary material [30]. In the top left corner of LLM test outputs will never be identical to the baseline. Our metrics
the FBD, the figure shows an ANALOG_IN function block named assess whether the LLM-generated FBDs accurately recognize and
“FT-101”, which the LLM has instantiated for the flow transmitter implement the required control strategies, and whether the LLM
FT-101. This function block has an output “PV” (for process value), correctly maps important alarm parameters from the specification
which drives the RATIO_CONTROL block FFIC-102, according to to the function block. GPT-5 consistently identified the control
the ratio control strategy detected by the LLM in the control narra- strategy needed in all cases flawlessly (Q2M1= 100%).
tive section (highlighted connection in light blue). Several functions Q2M2 assessed whether transmitters and actuators from the
“OR” and “NOT” implement interlocking control logic involving control narrative were correctly mapped to BASIC_LIB function
Boolean expressions. The LLM correctly configured the alarm levels blocks, in line with the identified control strategy. Our automated
of the ANALOG_IN block “LT-104” with values of 20 and 90 for the scripts indicated several mismatches between the block mappings
low and high alarm thresholds of the signal. The FBD control logic of the baseline and the test runs. However, upon reviewing these
will thus ensure that the reactor inflow valves are closed when the mismatches, we found that most of them stemmed from either in-
tank level rises above 90 percent. The complete diagram includes 11 completeness or ambiguities in the control narrative, which allowed
function blocks, three functions, 11 variables, 32 data connections, for different valid ways of implementing the FBD. A detailed ex-
and 24 parameters. planation of each mismatch is in the supplementary material [30].
Our unattended test runs required no human intervention (Q1M1 Only for the continuous digester of the Chemical Pulping and Paper
= 0), which demonstrates that the LLM workflows and prompts are Production (section 3), the LLM-generated FBD missed mapping the
defined with a sufficient level of detail and generality to handle control valve LV-103 to a VALVE_ELECTRIC function block. For
the various control narrative specifications. Context generation the other sections, GPT-5 instantiated the control strategy-related
was fully automated, as well as diagram creation and auto-layout. function blocks correctly (Q2M2=99.6%).
However, our tests did not yet involve merging prior control logic Q2M3 measured the correct creation of connections related to
or utilizing rare parameters of function blocks, which may require the identified control strategy. We omitted comparing additional
ABB Corporate Research Center, Mannheim, Germany Koziolek et al.
Figure 8: Excerpt of an LLM-generated Function Block Diagram (FBD) for the Ammonium Nitrates Plant (Section Neutralization
Reactor) in OpenPLC. The LLM has instantiated the required function block types from a user-defined library and connected
and parametrized them according to the detected control strategy.
“glue logic” connections to the baseline, as there are many degrees construction time is estimated as a multiple of Q1M3, as the manual
of freedom in the implementation that would result in an exact creation of the FBD requires understanding and interpretation of
match only by chance. Except in two cases, GPT-5 generated the the control narrative, as well as manual work to use the PLC IDE,
control strategy connections in the FBD correctly (Q2M3=98,6%). depending on the complexity of the FBD. With a factor of 2 - 3
In one case, the LLM generated an erroneous connection to a ratio on Q1M3 (median 42.8 minutes), the manual creation of an FBD
controller. In the other case, the LLM routed a feedback signal from for a single control narrative section would require between 85.6
a valve back to a PID controller, which our subject matter experts and 128.4 minutes. With LLM-construction time assumed zero (no
considered incorrect. human labor due to Q1M1=0) and Q1M2 estimated as 5 minutes
Q2M4 measured the correct mapping of important alarm pa- human labor, this would lead to a time saving between 94.2% and
rameters from the specification to the FBD. In 5 of 173 cases, the 96.1% (Q3M1≈ 95%).
LLM-generated mapping to the FBD resulted in a mismatch with While the FBD generation leads to time and cost savings due to
the baseline FBD, as the LLM created values that were not present shorter human labor, the generation induces monetary costs for
in the control narrative or missed specified values. However, in 168 LLM token usage. From our test runs, Azure AI Foundry monitoring
out of 173 cases, GPT-5 mapped the alarm parameters correctly tools showed that generating an FBD for a single control narrative
(Q2M4= 97.1%). section required approximately 25,000 input tokens and 60,000
Qualitative findings support the quantitative metrics: The LLM completion tokens. According to current pricing, Azure GPT-5
created necessary function block instantiations that were not explic- token costs are 1.25 USD per 1 million input tokens and 10 USD per
itly mentioned in the control narrative, indicating that the narrative 1 million completion tokens. Therefore, the costs for processing a
was slightly incomplete. Its additions matched what a control engi- control narrative chunk and generating an FBD are 0.031 + 0.6 =
neer would do. The LLM also inferred parameters such as scaling 0.631 USD (Q3M2≈ 0.63 USD). Compared to human labor costs, the
slopes and alarm levels correctly. Although the narrative specified LLM costs are thus negligible.
interlocking logic in separate sentences, the LLM formulated them
into correct Boolean expressions. Our limited BASIC_LIB library 4.3 Results with Commercial Data
complicated the implementation of some safety features (e.g., per-
We also tested Spec2Control in several commercial ABB automa-
missive ranges), leading the LLM to devise custom logic or omit
tion projects, including a desalination plant with multiple pumping
these features. Enhancements in BASIC_LIB are needed.
stations, a water supply system for an offshore converter station,
For quantifying the cost/benefit ratio of Spec2Control, Q3M1
and an asphalt production facility. These tests used different ABB
divides the LLM construction time (Q1M1) plus LLM-induced re-
libraries and generated ABB’s proprietary version of FBDs. We
work time (Q1M2) by the manual construction time of an FBD. This
found that experiences with using libraries and best practices for
ratio excludes the time for checking semantical correctness (Q1M3),
composing the pre-specified blocks require interviews with experi-
which is still required both with and without Spec2Control. Manual
enced control engineers. Context generation may differ significantly
Spec2Control ABB Corporate Research Center, Mannheim, Germany
Data Connections
Control Strategy
Function Blocks engineers are keen on the results due to the tool’s integration with
their systems and the familiar notation it generates. A software
Functions
Variables
Production
team is refining the Spec2Control prototype into a commercial
Plant Title
2 Neutralization ReactorRatio 11 3 11 32 24 100,0 100,0 4/4 100,0 7/7 100,0 product.
Ammonium 3 Evaporation and Conditioning
Cascade 11 11 1 32 27 100,0 100,0 4/4 100,0 4/4 100,0
Nitrates 4 Prilling Tower/Granulator
Cascade9 3 7 26 26 100,0 100,0 4/4 100,0 2/2 100,0
Production 5 Cooling and Coating Circuit
Cascade8 12 5 33 27 100,0 100,0 4/4 100,0 4/4 100,0
6 Storage and Load-OutRatio 7 14 4 32 21 100,0 100,0 3/4 75,0 3/3 100,0 5 Threats to Validity
2 Distillation Column (T-101)
PID 8 3 5 21 17 100,0 100,0 2/2 100,0 4/4 100,0
Benzene
3 Reboiler Heat ExchangerPID(E-106)
9 1 5 17 23 100,0 100,0 2/2 100,0 3/3 100,0 After analyzing our results, we discuss potential threats to their
Distillation
4 Overhead Condenser and Cascade
Accumulator
8 5 8 29 (E-104
23 and
100,0
V-104)
100,0 4/4 100,0 3/3 100,0 validity. The internal validity refers to causal correctness, i.e.,
Column
6 Bottoms Product Handling
Ratio 9 4 4 25 14 100,0 100,0 4/4 100,0 1/1 100,0
2 Atmospheric Distillation
Ratio
Unit (ADU)
9 3 11 39 30 100,0 100,0 4/4 100,0 9/9 100,0 whether the outcome (generated FBDs) was really caused by the
3 Vacuum Distillation Unit
PID(VDU) 5 3 2 13 15 100,0 100,0 2/2 100,0 2/2 100,0 treatment (using Spec2Control/LLM) or whether other factors in-
4 Fluid Catalytic Cracking
PID(FCC)11Unit
19 11 47 38 100,0 100,0 2/2 100,0 2/2 100,0
Coking 5 Delayed Coking Unit PID 11 4 7 27 21 100,0 100,0 2/2 100,0 2/2 100,0 terfered with the results. In our case, LLM non-determinism could
Refinery 6 Hydrotreating Units PID 10 17 9 49 32 100,0 100,0 5/5 100,0 4/4 100,0 affect the generated FBDs. We noticed, for example, slight varia-
7 Petroleum Coke HandlingPID System
10 14 20 52 30 100,0 100,0 2/2 100,0 3/3 100,0
8 Utilities and Offsites Ratio 9 5 1 23 15 100,0 100,0 4/4 100,0 2/2 100,0 tions in the naming of variables or in the composition of glue logic
9 Flare and Relief Systems
PID 6 6 3 21 15 100,0 100,0 2/2 100,0 2/2 100,0 across different GPT-5 runs. Still, the non-determinism rarely led
2 Seawater and Reservoir PIDIntake
13 Pipelines
26 14 68 57 100,0 100,0 2/2 100,0 7/7 100,0
Desalination 3 Intake Screens and Air-Blast
Ratio 20Cleaning
29 2 System
5 3 100,0 100,0 4/4 100,0 3/3 100,0 to syntactical errors. The metrics Q2M1-Q2M4 for the open dataset
Plant Intake 4 Intake Pumps and Sump PIDPumps14 5 5 3 17 100,0 100,0 2/2 100,0 2/2 100,0 remained stable across runs, indicating that our LLM workflows
System 5 Shock Chlorination System
PID 10 7 4 27 14 100,0 100,0 2/2 100,0 2/2 100,0
6 Sampling and Bypass Ratio
Flow Systems
6 2 6 18 22 100,0 100,0 3/3 100,0 0/0 100,0 sufficiently control LLM token generation.
2 Feed-Gas Reception and RatioPretreatment
7 2 6 20 17 100,0 100,0 3/3 100,0 0/0 100,0 Another threat to internal validity is the missing FBD verification,
LNG
3 Acid Gas Removal (AminePID Absorber
6 2 System)
5 16 19 100,0 100,0 2/2 100,0 2/2 100,0
(Liquified e.g., based on a simulation of sensors and actuators. The safety
4 Molecular-Sieve Dehydration
Ratio 9and1Mercury
6 19 20 Removal
100,0 100,0 4/4 100,0 2/3 66,7
Natural Gas)
5 Heavy-Hydrocarbon and VOTING
NGL16Recovery
4 2 36 40 100,0 100,0 5/5 100,0 2/2 100,0 of Spec2Control-generated FBDs relies on three principles: First,
Production
6 Liquefaction and Refrigerant
Ratio System
8 23 9 51 26 100,0 100,0 4/4 100,0 1/1 100,0
Train Spec2Control uses pre-validated function blocks, instantiated from
7 LNG Storage and Ship-Loading
Ratio 9 2 10 29 34 100,0 100,0 4/4 100,0 4/4 100,0
2 2-Phase Separator Control
Ratio 9 2 5 24 11 100,0 100,0 4/4 100,0 4/4 100,0 extensively tested libraries. Second, unlike general code generation,
Multi-Phase 3 3-Phase Separator Control
PID 4 2 3 16 18 100,0 100,0 2/2 100,0 4/4 100,0
Separation 4 Oil Tank Control PID 5 5 6 18 14 100,0 100,0 2/2 100,0 2/2 100,0 FBD generation is limited to instantiating predefined block types,
and Storage 5 Water Tank and PumpPID Control
10 12 10 42 34 100,0 100,0 4/4 100,0 2/2 100,0 creating connections, setting numerical parameters, and composing
System 6 Water Coalescer ControlPID 7 3 3 22 30 100,0 100,0 4/4 100,0 4/4 100,0
7 Air Compressor Control PID 5 3 4 16 15 100,0 100,0 2/2 100,0 2/2 100,0 glue logic, which reduces potential failure modes. Third, industrial
2 Wood Handling and Chipping
PID 8 11 8 34 28 100,0 100,0 4/4 100,0 2/2 100,0 practice already requires a layered verification procedure, where
3 Continuous Digester Cascade8 2 6 23 26 100,0 80,0 2/2 100,0 4/4 100,0
4 Washing and Screening PID 11 7 5 32 17 100,0 100,0 3/4 75,0 2/2 100,0
logic is simulation-tested before deployment, undergoes factory
Chemical
5 Bleaching Towers PID 9 1 6 19 43 100,0 100,0 2/2 100,0 4/4 100,0 acceptance tests (FAT) [22], and also relies on runtime monitoring.
Pulping and
6 Refining and Machine PIDChest 14 9 7 36 34 100,0 100,0 5/5 100,0 4/4 100,0
Paper Thus, Spec2Control fits well within this existing safety framework.
7 Approach Flow and Forming
Ratio 10 9 17 5 5 100,0 100,0 2/2 100,0 2/3 66,7
Production
8 Press Section PID 8 5 12 29 22 100,0 100,0 4/4 100,0 2/2 100,0 Our subject matter experts deemed the baseline FBDs sufficiently
9 Dryer Section PID 13 8 6 38 51 100,0 100,0 2/2 100,0 5/5 100,0
10 Finishing and WindingRatio 7 9 3 26 22 100,0 100,0 2/2 100,0 1/1 100,0
valid based on inspections.
2 Sinter Plant Ratio 6 5 4 22 11 100,0 100,0 4/4 100,0 2/2 100,0 The construct validity refers to whether the operational mea-
3 Coking Facility VOTING 15 17 2 44 27 100,0 100,0 5/5 100,0 3/3 100,0
4 Blast Furnace Ratio 7 7 6 30 18 100,0 100,0 4/4 100,0 4/4 100,0
sures (e.g., test cases, function blocks, LLM) truly represent the
Integrated
Steel Plant
5 Basic Oxygen Furnace VOTING
(BOF) 16 30 3 65 28 100,0 100,0 4/4 100,0 0/0 100,0 constructs (e.g., customer narratives, commercial libs, engineering
6 Secondary MetallurgyPID 6 5 5 23 21 100,0 100,0 2/2 100,0 4/4 100,0
Process tools) that shall be studied. While we generated the control narra-
7 Continuous Casting PID 10 2 4 20 18 100,0 100,0 2/2 100,0 1/2 50,0
8 Rolling Mills Ratio 8 18 13 53 27 100,0 100,0 4/4 100,0 1/1 100,0 tives for testing Spec2Control, they are based on screening many
9 By-Product Recovery Systems
Ratio 10 11 7 36 22 100,0 100,0 4/4 100,0 0/0 100,0
2 Feed System PID 9 3 3 21 18 100,0 100,0 2/2 100,0 2/2 100,0
customer-written narratives and were reviewed by experienced
Multi-Column
3 Column 1 and ReboilerPID 7 3 4 19 25 100,0 100,0 2/2 100,0 4/4 100,0 ABB control engineers. These control narratives may not capture
4 Decanter 1 PID 4 6 8 20 24 100,0 100,0 2/2 100,0 2/2 100,0
Chemical all the intricacies observed in practice, such as incompleteness, in-
5 Column 2 and ReboilerPID 7 2 4 13 27 100,0 100,0 4/4 100,0 3/3 100,0
Distillation
System
7 Column 3 and ReboilerPID 7 11 9 32 35 100,0 100,0 4/4 100,0 2/2 100,0 consistencies, local languages, or distorted images, which require
8 Decanter 2 PID 8 19 5 45 38 100,0 100,0 4/4 100,0 2/2 100,0
9 Condenser Systems PID 6 6 7 28 22 100,0 100,0 2/2 100,0 2/2 100,0
addressing through pre-processing steps. Spec2Control currently
2 Influent & HeadworksPID 8 12 10 40 17 100,0 100,0 4/4 100,0 2/2 100,0 supports the most popular control strategies (e.g., PID, cascade),
4 Primary Treatment Ratio 8 2 5 29 16 100,0 100,0 4/4 100,0 2/2 100,0
Waste Water 7 Secondary ClarificationDuty-Standby
17 6 4 44 31 100,0 100,0 2/2 100,0 2/4 50,0
but has not been tested for other, less common strategies or custom
Treatment 9 Disinfection Ratio 8 17 6 49 13 100,0 100,0 2/2 100,0 0/0 100,0 logic. The BASIC_LIB used for testing is synthetic due to IP con-
Plant 10 Influent Lift Station Duty-Standby
6 19 7 51 15 100,0 100,0 4/4 100,0 1/1 100,0
11 Utilities, Chemicals & Controls
Ratio 6 3 2 26 14 100,0 100,0 4/4 100,0 0/0 100,0
cerns and less complex than commercial libraries [1, 10, 48]. It may
12 Sludge/Biosolids Management
PID 6 3 5 16 21 100,0 100,0 3/3 100,0 3/3 100,0 thus be unable to deal with any control narrative. We focused on
Total: 100,0 99,7 204/ 98,6 168/ 97,1
207 173
FBD as a popular IEC 61131-3 notation [52] and excluded sequen-
tial procedures, which control engineers usually realize with SFCs.
Figure 9: Open Dataset with 10 control narratives and 65 Our tests ran with GPT-5 as a typical state-of-the-art LLM. Subject
sections: statistics on the baseline FBDs (left-hand side) and
metrics Q2M1-Q2M4 based on test runs (right-hand side).
ABB Corporate Research Center, Mannheim, Germany Koziolek et al.
matter experts reviewed our constructs and deemed them realistic, the CAEX translator [13], which applied rules on P&IDs to detect
as they accurately reflect many practical cases. topological patterns that could be translated into interlocking logic
The external validity questions if our findings apply beyond expressed as ST-code. Steinegger and Zoitl [49] explored translating
the tested dataset. We have conducted successful spot tests of industrial requirements into a reference ontology from which they
Spec2Control with customer narratives, ABB libraries, and PLC generated IEC 61131-3 ST. The AUKOTON method [21] mapped
IDEs. Our LLM workflows can extend to other notations, such as XML-based P&IDs into a domain-specific model in Eclipse Ecore
SFC and ST, or generate C code. Spec2Control can adapt to various and then generated IEC 61131-3 programs. Gruener et al. [18] con-
vendor-specific libraries and notations. Our tests span multiple in- verted a P&ID-based plant structure into a Neo4J graph database
dustries and encompass primary control strategies, interlocks, and and used Cypher queries to generate control logic. Koziolek et
alarms. HMI functionality is not yet supported. Implementing pro- al. [32] showed the successful derivation of interlocking logic from
duction sequences, such as startup/shutdown, in FBDs is complex P&IDs in four large-scale case studies.
and requires Spec2Control’s extension to SFCs with embedded ST. Another line of work explored model-driven techniques from
We support the reliability of our study by publishing the test software engineering to generate control logic. Researchers mod-
data and Spec2Control implementation in supplementary data for eled manufacturing equipment using extensions to UML [23, 41, 51,
independent validation and reproduction. 55–57] and SysML [54] and then generated IEC 61131-3. Others pro-
posed novel domain-specific modeling notations [4, 15, 25, 38, 44–
46] to ease the generation of IEC 61131-3 control logic. As a result
6 Related Work of this research, one commercial PLC IDE (CODESYS) now enables
Modern control logic engineering in industrial automation often UML modeling; however, many control engineers still prefer to
involves notations based on IEC 61131-3, IEC 61499, or vendor- work directly with the IEC 61131-3 notations.
specific variants [22, 52]. Briefly after the popularization of LLMs,
researchers demonstrated the capabilities of GPT-4 to synthesize
syntactically correct IEC 61131-3 ST programs [33, 53, 58]. Fakih et
al. [16] from Siemens proposed LLM4PLC. This approach utilizes 7 Conclusions
fine-tuned LLMs for a Siemens variant of ST (SCL), which gener- We introduced Spec2Control, an LLM workflow that generates
ates simple control logic and performs model checking in a lab control logic autonomously from control narrative specifications.
environment. Liu et al. [37] introduced a multi-agent framework Spec2Control chunks control narratives, builds up context corre-
for ST-code generation, called Agents4PLC, which incorporates sponding to a control library of pre-specified function blocks, and
chain-of-thought reasoning and iterative refinement. Yang et al.[59] then creates function block diagrams and passes them to typical
developed AutoPLC, a framework for LLM-supported ST-code gen- PLC IDEs for rendering. Tests with a comprehensive open dataset
eration using a database of implementation examples. Haag et demonstrated that Spec2Control can, in almost all cases, generate
al. [20] fine-tuned LLMs for the generation of ST-code, achieving a control logic of high quality (with more than 97% correctness com-
higher compilation success rate. All of these approaches used small pared to a baseline). The approach can save around 95% of effort
test programs and generated output in the simple ST notation. compared to the manual control logic engineering.
Researchers then continued to refine LLM-based control logic Programmers and control engineers in industrial automation
generation. Koziolek et al. [34] showed how proprietary informa- can test Spec2Control on their own data or utilize the open dataset
tion can be integrated into ST-code using retrieval-augmented to refine their own LLM-based generation approaches. The open
generation. Another approach demonstrated LLM-based ST gen- dataset is independent of Spec2Control and published in the sup-
eration from P&ID images, utilizing the capabilities of a multi- plementary material. Researchers can independently validate the
modal LLM [35]. Zhang and de Sousa [60, 61] explored generating results and further refine the approach. We are currently working
graphical IEC 61131-3 notations (LD, SFC) via ASCII art. Test case with ABB control engineers to productize the tooling and further
generation for IEC 61131-3 ST function blocks was investigated strengthen it, so that control engineers can use it in many future
with moderate success [29]. Salari et al. converted the ST-code to automation projects.
Python to enable the reuse of LLM-based test case generation ap- Planned near-term enhancements of Spec2Control include ad-
proaches [42]. Ren et al. proposed “MetaIndux-PLC”, a fine-tuned dressing sequential logic and translating it into sequential function
foundation model for control code generation, which enables the charts (SFCs) with embedded structured text. Merging newly gen-
creation of more accurate and structured PLC code. Siemens, Beck- erated logic with existing logic is under development. Furthermore,
hoff, and B&R Automation created industrial copilots, mainly for the planning step for chunking the control narratives shall be auto-
interactive PLC programming in ST. So far, none of these approaches mated and refined further. We will enhance the LLM workflow to
has generated IEC 61131-3 FBDs or utilized industrial-scale test make it more robust in handling inconsistencies or incomplete in-
samples. Therefore, a direct comparison of Spec2Control to these puts by incorporating human user feedback. Additional user require-
approaches is not appropriate since they address different use cases. ments, such as I/O lists and graphical P&IDs, shall be integrated
Before the advent of generative AI, researchers and practition- into the processing chain to make it more flexible and comprehen-
ers had been pursuing the automation of the laborious and cost- sive. Future work with a long-term focus includes extending the
intensive control engineering process for several decades [31]. One approach from control logic to the generation of graphical human
line of work tried synthesizing ST control logic directly from object- operator interfaces and supporting the conversion of legacy control
oriented P&IDs [7, 14, 26, 28, 40, 43]. Drath and Fay proposed logic into modern notations for migration projects.
Spec2Control ABB Corporate Research Center, Mannheim, Germany
References [25] Robert Julius, Max Schürenberg, Frank Schumacher, and Alexander Fay. 2017.
[1] ABB. 2019. ABB Ability System 800xA Engineering Overview. [Link] Transformation of GRAFCET to PLC code including hierarchical structures.
[Link]/library/[Link]?DocumentID=3BDD013082 Control Engineering Practice 64 (2017), 173–194.
[2] ABB. 2025. ABB No.1 global market leader in Distributed Control Systems. [26] Byung Chul Kim, Hyungki Kim, Yoochan Moon, Gwang Lee, and Duhwan Mun.
[Link] 2022. End-to-end digitization of image format piping and instrumentation dia-
[3] ABB. 2017. Sadara Brochure. [Link] grams at an industrially applicable level. Journal of Computational Design and
69d320c591c542d49b7a3d555820ab95/[Link] Engineering 9, 4 (2022), 1298–1326.
[4] María Luz Alvarez, Isabel Sarachaga, Arantzazu Burgos, Elisabet Estévez, and [27] Myke King. 2016. Process control: a practical approach. John Wiley & Sons.
Marga Marcos. 2016. A methodological approach to model-driven design and [28] Gennadiy Koltun, Moritz Kolter, and Birgit Vogel-Heuser. 2018. Automated
development of automation systems. IEEE Transactions on Automation Science generation of modular PLC control software from P&ID diagrams in process
and Engineering 15, 1 (2016), 67–79. industry. In 2018 IEEE International Systems Engineering Symposium (ISSE). IEEE,
[5] Thiago Rodrigues Alves, Mario Buratto, Flavio Mauricio De Souza, and 1–8.
Thelma Virginia Rodrigues. 2014. OpenPLC: An open source alternative to [29] Heiko Koziolek, Virendra Ashiwal, Soumyadip Bandyopadhyay, and Chandrika
automation. In IEEE Global Humanitarian Technology Conference (GHTC 2014). KR. 2024. Automated control logic test case generation using large language
IEEE, 585–589. models. In 2024 IEEE 29th International Conference on Emerging Technologies and
[6] Sangeetha Annam, Merry Saxena, Ujjwal Kaushik, and Shikha Mittal. 2025. Factory Automation (ETFA). IEEE, 1–8.
LangChain: Simplifying Development with Language Models. Textual Intelligence: [30] Heiko Koziolek, Thilo Braun, Virendra Ashiwal, Sofia Linsbauer, Marthe
Large Language Models and Their Real-World Applications (2025), 287–304. Ahlgreen Hansen, and Karoline Grotterud. 2025. Spec2Control: Source Code and
[7] Esteban Arroyo, Mario Hoernicke, Pablo Rodríguez, and Alexander Fay. 2016. Supplemental Data. [Link] Version v1.0;
Automatic derivation of qualitative plant simulation models from legacy piping accessed 28 Sep 2025.
and instrumentation diagrams. Computers & Chemical Engineering 92 (2016), [31] Heiko Koziolek, Andreas Burger, Marie Platenius-Mohr, and Raoul Jetley. 2020.
112–132. A classification framework for automated control code generation in industrial
[8] B&R Automation. 2024. B&R introduces new coding environment with cloud automation. Journal of Systems and Software 166 (2020), 110575.
collaboration and AI assistant. [Link] [32] Heiko Koziolek, Andreas Burger, Marie Platenius-Mohr, Julius Rückert, Hadil
us/press-room/bampr-introduces-new-coding-environment-with-cloud- Abukwaik, Raoul Jetley, and Abdulla P P. 2020. Rule-based code generation
collaboration-and-ai-assistant-12-11-2024/ in industrial automation: four large-scale case studies applying the cayenne
[9] Beckhoff. 2025. From chatbot to intelligent agent: TwinCAT Chat becomes method. In Proceedings of the ACM/IEEE 42nd International Conference on Software
TwinCAT CoAgent. [Link] Engineering: Software Engineering in Practice. 152–161.
twincat-projects-with-ai-supported-engineering/ [33] Heiko Koziolek, Sten Gruener, and Virendra Ashiwal. 2023. ChatGPT for
[10] Beckhoff. 2025. TwinCAT3 - PLC Libraries. [Link] PLC/DCS Control Logic Generation. In Proc. IEEE Int. Conf. on Emerging Tech-
com/[Link]?content=../content/1033/tcinfosys3/[Link]&id= nologies and Factory Automation (ETFA2023).
8505895370400145937 [34] Heiko Koziolek, Sten Gruener, Rhaban Hark, Virendra Ashiwal, Sofia Linsbauer,
[11] Michael Brendelberger and Martin Dubovy. 2013. Erfahrungen mit Web-basierter and Nafise Eskandani. 2024. LLM-based and Retrieval-Augmented Control Code
As-Built-Dokumentation. atp edition 55, 01-02 (2013), 32–37. Generation. In Proc. 1st International Workshop on Large Language Models for
[12] Victor R Basili1 Gianluigi Caldiera and H Dieter Rombach. 1994. The goal Code (2024). ACM.
question metric approach. Encyclopedia of software engineering (1994), 528–532. [35] Heiko Koziolek and Anne Koziolek. 2024. Llm-based control code generation
[13] Rainer Drath, Alexander Fay, and Till Schmidberger. 2006. Computer-aided using image recognition. In Proceedings of the 1st International Workshop on Large
design and implementation of interlock control code. In 2006 IEEE Conference Language Models for Code. 38–45.
on Computer Aided Control System Design, 2006 IEEE International Conference on [36] Herbert Krause. 2007. Virtual commissioning of a large LNG plant with the DCS
Control Applications, 2006 IEEE International Symposium on Intelligent Control. 800XA by ABB. In 6th EUROSIM Congress on Modelling and Simulation, Ljubljana,
IEEE, 2653–2658. Slovénie.
[14] Rainer Drath and Idar Ingebrigtsen. 2018. Digitalization of the IEC PAS 63131 [37] Zihan Liu, Ruinan Zeng, Dongxia Wang, Gengyun Peng, Jingyi Wang, Qiang
standard with AutomationML. In 2018 IEEE 23rd International Conference on Liu, Peiyu Liu, and Wenhai Wang. 2024. Agents4plc: Automating closed-loop plc
Emerging Technologies and Factory Automation (ETFA), Vol. 1. IEEE, 901–909. code generation and verification in industrial control systems using llm-based
[15] Elisabet Estévez, Marga Marcos, and Darío Orive. 2007. Automatic generation agents. arXiv preprint arXiv:2410.14209 (2024).
of PLC automation projects from component-based models. The International [38] Tomaž Lukman, Giovanni Godena, Jeff Gray, Marjan Heričko, and Stanko Str-
Journal of Advanced Manufacturing Technology 35, 5 (2007), 527–540. mčnik. 2013. Model-driven engineering of process control software–beyond
[16] Mohamad Fakih, Rahul Dharmaji, Yasamin Moghaddas, Gustavo Quiros, device-centric abstractions. Control Engineering Practice 21, 8 (2013), 1078–1096.
Oluwatosin Ogundare, and Mohammad Abdullah Al Faruque. 2024. Llm4plc: Har- [39] Lingrui Mei, Jiayu Yao, Yuyao Ge, Yiwei Wang, Baolong Bi, Yujun Cai, Jiazhi
nessing large language models for verifiable programming of plcs in industrial Liu, Mingyu Li, Zhong-Zhi Li, Duzhen Zhang, et al. 2025. A survey of context
control systems. In Proceedings of the 46th International Conference on Software engineering for large language models. arXiv preprint arXiv:2507.13334 (2025).
Engineering: Software Engineering in Practice. 192–203. [40] Cheng Pang, Valeriy Vyatkin, and Wenbin Dai. 2014. Iec 61499 based model-
[17] Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yixin driven process control engineering. In Proceedings of the 2014 IEEE Emerging
Dai, Jiawei Sun, Haofen Wang, and Haofen Wang. 2023. Retrieval-augmented Technology and Factory Automation (ETFA). IEEE, 1–8.
generation for large language models: A survey. arXiv preprint arXiv:2312.10997 [41] Seno Panjaitan and Georg Frey. 2006. Combination of UML modeling and the IEC
2, 1 (2023). 61499 function block concept for the development of distributed automation sys-
[18] Sten Grüner, Peter Weber, and Ulrich Epple. 2014. Rule-based engineering using tems. In 2006 IEEE Conference on Emerging Technologies and Factory Automation.
declarative graph database queries. In 2014 12th IEEE International Conference on IEEE, 766–773.
Industrial Informatics (INDIN). IEEE, 274–279. [42] Mikael Ebrahimi Salari, Eduard Paul Enoiu, Alessio Bucaioni, Wasif Afzal, and
[19] Georg Gutermuth, Ben Schroeter, Rainer Drath, Nuo Li, and Christian Messinger. Cristina Seceleanu. 2025. PyLC+: A Scalable Python Framework for Automated
2014. A novel approach to measure engineering efficiency of automation projects. Translation and Testing of Industrial PLC Programs. In 2025 IEEE 49th Annual
In Proceedings of the 2014 IEEE Emerging Technology and Factory Automation Computers, Software, and Applications Conference (COMPSAC). IEEE, 628–639.
(ETFA). IEEE, 1–8. [43] Nicolai Schoch, Mario Hoernicke, Nika Strem, and Katharina Stark. 2024. En-
[20] Aaron Haag, Bertram Fuchs, Altay Kacan, and Oliver Lohse. 2025. Training gineering Data Funnel (WIP)–An Ontology-Enhanced LLM-Based Agent and
LLMs for Generating IEC 61131-3 Structured Text with Online Feedback. In 2025 MoE System for Engineering Data Processing. In 2024 IEEE 29th International
IEEE/ACM International Workshop on Large Language Models for Code (LLM4Code). Conference on Emerging Technologies and Factory Automation (ETFA). IEEE, 1–5.
IEEE, 65–71. [44] Frank Schumacher and Alexander Fay. 2014. Formal representation of GRAFCET
[21] David Hästbacka, Timo Vepsäläinen, and Seppo Kuikka. 2011. Model-driven to automatically generate control code. Control Engineering Practice 33 (2014),
development of industrial process control applications. Journal of Systems and 84–93.
Software 84, 7 (2011), 1100–1113. [45] Frank Schumacher, Sebastian Schröck, and Alexander Fay. 2013. Tool support
[22] Martin Hollender. 2010. Collaborative process automation systems. ISA. for an automatic transformation of GRAFCET specifications into IEC 61131-3
[23] Tanvir Hussain and Georg Frey. 2006. UML-based development process for IEC control code. In 2013 IEEE 18th Conference on Emerging Technologies & Factory
61499 with automatic test-case generation. In 2006 IEEE Conference on Emerging Automation (ETFA). IEEE, 1–4.
Technologies and Factory Automation. IEEE, 1277–1284. [46] Frank Schumacher, Sebastian Schröck, and Alexander Fay. 2013. Transforming
[24] Raoul Jetley, Divyasheel Sharam, Abdulla Puthan Peedikayil, Dirk Schulz, and hierarchical concepts of GRAFCET into a suitable Petri net formalism. IFAC
Vadthyavath Ramu. 2024. Method and system to generate control logic for Proceedings Volumes 46, 9 (2013), 295–300.
performing industrial processes. US Patent 12,153,406. [47] Siemens. 2025. SIEMENS Engineering Copilot. [Link]
en-us/v1.1/siemens-engineering-copilot/
ABB Corporate Research Center, Mannheim, Germany Koziolek et al.
[48] Siemens. 2025. SIMATIC Control Function Library. [Link] 2005 international conference on control and automation, Vol. 2. IEEE, 1034–1039.
[Link]/en/article/detail/109974209 [56] Daniel Witsch and Birgit Vogel-Heuser. 2009. Close integration between UML
[49] Michael Steinegger and Alois Zoitl. 2012. Automated code generation for pro- and IEC 61131-3: New possibilities through object-oriented extensions. In 2009
grammable logic controllers based on knowledge acquisition from engineering IEEE Conference on Emerging Technologies & Factory Automation. IEEE, 1–6.
artifacts: Concept and case study. In Proceedings of 2012 IEEE 17th International [57] Daniel Witsch and Birgit Vogel-Heuser. 2011. PLC-statecharts: An approach
Conference on Emerging Technologies & Factory Automation (ETFA 2012). IEEE, to integrate UML-statecharts in open-loop control engineering–aspects on be-
1–8. havioral semantics and model-checking. IFAC Proceedings Volumes 44, 1 (2011),
[50] Roberto Tamassia. 2013. Handbook of graph drawing and visualization. CRC 7866–7872.
press. [58] Weiyi Xia, Yinggang Zhang, Ben Zhao, Wei Liu, Linjie Han, and Qifu Ye. 2025. In-
[51] Kleanthis Thramboulidis and Georg Frey. 2011. An MDD process for IEC 61131- telligent PLC Code Generation in HCPS 2.0: A Multi-dimensional Taxonomy and
based industrial automation systems. In ETFA2011. IEEE, 1–8. Evolutionary Framework. In Proceedings of the 2025 2nd International Conference
[52] Michael Tiegelkamp and Karl-Heinz John. 2010. IEC 61131-3: Programming on Generative Artificial Intelligence and Information Security. 202–212.
industrial automation systems. Vol. 166. Springer. [59] Donghao Yang, Aolang Wu, Tianyi Zhang, Li Zhang, Fang Liu, Xiaoli Lian, Yum-
[53] Kilian Tran, Jingxi Zhang, Jérôme Pfeiffer, Andreas Wortmann, and Bianca Wies- ing Ren, and Jiaji Tian. 2024. A multi-agent framework for extensible structured
mayr. 2024. Generating plc code with universal large language models. In 2024 text generation in PLCs. arXiv preprint arXiv:2412.02410 (2024).
IEEE 29th International Conference on Emerging Technologies and Factory Automa- [60] Yimin Zhang and Mario de Sousa. 2024. Exploring LLM Support for Generat-
tion (ETFA). IEEE, 1–8. ing IEC 61131-3 Graphic Language Programs. In 2024 IEEE 22nd International
[54] Birgit Vogel-Heuser, Daniel Schütz, Timo Frank, and Christoph Legat. 2014. Conference on Industrial Informatics (INDIN). IEEE, 1–7.
Model-driven engineering of manufacturing automation software projects–A [61] Yimin Zhang and Mario de Sousa. 2025. Converting IEC 61131-3 LD into SFC
SysML-based approach. Mechatronics 24, 7 (2014), 883–897. Using Large Language Model: Dataset and Testing. arXiv preprint arXiv:2509.12593
[55] Birgit Vogel-Heuser, Daniel Witsch, and Uwe Katzke. 2005. Automatic code (2025).
generation from a UML model to IEC 61131-3 and system configuration tools. In