LLM4SFC: Sequential Function Chart Generation via Large Language Models
Ofek Glick, Vladimir Tchuiev, Marah Ghoummaid, Michal Moshkovitz, Dotan Di-Castro

TL;DR
This paper introduces LLM4SFC, a novel framework that uses large language models to generate executable Sequential Function Charts from natural language descriptions, effectively bridging graphical and textual PLC programming languages.
Contribution
It presents the first method for converting natural language descriptions into executable SFCs, combining structured representation, fine-tuning, and real-time token pruning for compliance.
Findings
Achieves 75-94% success in generating valid SFCs.
Bridges graphical and textual PLC languages effectively.
Demonstrates applicability on real-world manufacturing data.
Abstract
While Large Language Models (LLMs) are increasingly used for synthesizing textual PLC programming languages like Structured Text (ST) code, other IEC 61131-3 standard graphical languages like Sequential Function Charts (SFCs) remain underexplored. Generating SFCs is challenging due to graphical nature and ST actions embedded within, which are not directly compatible with standard generation techniques, often leading to non-executable code that is incompatible with industrial tool-chains In this work, we introduce LLM4SFC, the first framework to receive natural-language descriptions of industrial workflows and provide executable SFCs. LLM4SFC is based on three components: (i) A reduced structured representation that captures essential topology and in-line ST and reduced textual verbosity; (ii) Fine-tuning and few-shot retrieval-augmented generation (RAG) for alignment with SFC…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Flexible and Reconfigurable Manufacturing Systems · Business Process Modeling and Analysis
