Native Ladder Blocks
With TIA Portal connected, the AI Agent works with native Ladder (LAD) blocks, not only SCL. It can explain the logic of an existing block, write a new one, change a network, or add networks to a block, and it compiles the result in TIA Portal and tells you what the compiler says.
What you can do
Section titled “What you can do”| Task | Example prompt |
|---|---|
| Understand a block | “Read FC_ConveyorStart and explain what each network does.” |
| Find something | “Which networks in FB_PumpControl write the output Pump_Run?” |
| Write a new block | “Create a Ladder function FC_LampTest with a pushbutton input, a 3 second timer, and a lamp output. Lamp on while the button is held, for at most 3 seconds.” |
| Change a block | “In FB_PumpControl, change the preset of the delay timer in network 4 to 8 seconds.” |
| Add to a block | “Add a network to FB_PumpControl that resets the fault bit when the reset button is pressed.” |
| Review | “Check FC_Interlock for outputs that can be set and reset in the same scan.” |
How it works
Section titled “How it works”TIA Portal can export a Ladder block as text (the “SIMATIC source document”) and import it again. The agent reads that text, edits it, and imports the changed block. Reading a block and writing it back gives the identical block, including titles and comments.
- Reading needs no compile. It works on LAD and FBD blocks. Know-how-protected blocks cannot be read.
- Writing is for LAD blocks. The agent consults a built-in syntax reference of the Ladder text format, so the first import usually succeeds.
- Every import is compiled straight away. If there are errors, the agent reports them with their location and corrects the text. The project is saved only when the block compiles cleanly.
- A large block can be built in pieces: the agent appends networks to the end of an existing block, and a piece that does not compile is rolled back without harming the block.
Safeguards
Section titled “Safeguards”- An existing block is not overwritten unless you ask for it. The agent will tell you when a name is already in use, and will replace the block only when you agree.
- Imports are checked by the compiler, and the project is saved only when the block compiles.
- Everything the agent changes appears in the TIA Portal project like any other edit, so you can open the block and review it there before you save or download.
Requirements
Section titled “Requirements”- TIA Portal V21, with a project open and connected (see Overview). Native Ladder needs V20 Update 4 or later; V21 is what we test.
- For large exports or imports the agent uses your workspace folder; see Settings.
Limits
Section titled “Limits”- Writing FBD, STL, or SCL-only blocks as Ladder is not a conversion tool: it writes Ladder from what you describe or from an existing Ladder block. To convert from other languages, use the Ladder Migration tools.
- Creating a new organization block is not supported, because TIA Portal needs the event class chosen in its own dialog. Replacing the logic of an existing one works.
- Jumps and labels, and multilingual titles in more than one language, are not covered by our testing yet. Check the result.
- The agent cannot test how the logic behaves when it runs. Use PLCSIM Advanced or a safe test setup, as for any change.