use_fb_in_ladder
Clone a GUI-authored function block template into a new Ladder section, rebind instance name and pin variables, then build the project.
Instructions
Place a function block in LADDER by cloning a GUI-authored FFB-in-LD template and rebinding it — then build_project to confirm.
WHY: an FFB (EF/EFB/DFB) inside Ladder canNOT be hand-authored as XML — its pin columns come from Control Expert's GUI auto-layout, which import can't reproduce. So author the block in LD ONCE in the GUI (a 'template' section containing the FFBBlock), then this tool reuses that exact geometry and only swaps the instance name and pin variables. (For freely hand-authored block logic, use FBD instead.)
template_section: name of the GUI-made LD section holding the block. new_section: name for the generated section (overwrites if it exists). instance_name: the new FB instance variable name. bindings: {pinName: variable_or_literal} to bind (e.g. {"Valve": "AV2", "ExtIntrlk": "Pump2_Intlk"}); pins you omit keep the template's bindings. Variable pins are auto-declared with the type the template used for that pin. task: the task of both sections (default MAST).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | MAST | |
| bindings | Yes | ||
| new_section | Yes | ||
| instance_name | Yes | ||
| template_section | Yes |