  LLM-based code generation could save significant manual efforts in industrial
automation, where control engineers manually produce control logic for
sophisticated production processes. Previous attempts in control logic code
generation lacked methods to interpret schematic drawings from process
engineers. Recent LLMs now combine image recognition, trained domain knowledge,
and coding skills. We propose a novel LLM-based code generation method that
generates IEC 61131-3 Structure Text control logic source code from
Piping-and-Instrumentation Diagrams (P&IDs) using image recognition. We have
evaluated the method in three case study with industrial P&IDs and provide
first evidence on the feasibility of such a code generation besides experiences
on image recognition glitches.
