Ladder Migration Overview
The Ladder Migration feature converts most vendor’s Ladder Diagram (LAD) programs to Structured Control Language (SCL) using the AI Agent. It targets engineers who need to modernise legacy Ladder programs — to make them easier to maintain, review in version control, or adapt for new projects.
Why migrate to SCL?
Section titled “Why migrate to SCL?”- Readability — SCL reads like code, which is easier to review in diff tools and version control (Git).
- Tooling — modern code analysis, formatting, and search tools work on text.
- Portability — SCL blocks can be imported into any S7-1500/1200 project.
- AI assistance — the AI Agent can explain, review, and extend SCL far more effectively than Ladder.
What the migration does
Section titled “What the migration does”Given Ladder network diagrams (exported as a PDF):
- The AI Agent reads each network’s contact and coil diagram.
- It converts the Ladder logic to semantically equivalent SCL.
- It adds inline comments explaining what each section does.
- It flags any constructs that are ambiguous or require your review.
What it handles well
Section titled “What it handles well”| Construct | Support |
|---|---|
| Normally open / closed contacts | Full |
| Output coils (SET, RESET, output) | Full |
| Comparison instructions | Full |
| Math and arithmetic | Full |
| Timer and counter calls (IEC timers) | Full |
| Move / type conversion instructions | Full |
| Standard FB instance calls (simple parameter sets) | Good |
| Complex nested call structures | Partial — review required |
Known limitations
Section titled “Known limitations”- FB instance calls with many parameters — the agent reconstructs these from the PDF but complex inline call structures may need manual cleanup.
- Network-level comments — preserved as
//comments above each network’s SCL, but formatting may not be perfect. - Hardware-specific instructions — instructions that map directly to hardware (e.g.
DPRD_DAT) are included but may require adaptation. - ENO handling — explicit
ENO := TRUEpatterns in converted blocks may be simplified.
Requirements
Section titled “Requirements”- The Ladder Migration MCP server must be running (connected via Settings → Connections → Ladder Migration MCP).
- A PDF export of the Ladder program (most vendors have a print/export function).
- TIA Portal connected (optional, but required if you want the agent to import the result directly).
Next steps
Section titled “Next steps”- Step-by-Step Workflow — how to run a migration end to end
- Reviewing SCL Output — what to look for before importing