Block Browser
With TIA Portal connected, the AI Agent can navigate your project’s block tree and return complete source code and interface definitions. You can explore blocks through conversation — no need to manually open each one in TIA Portal.
Browsing blocks
Section titled “Browsing blocks”Ask the agent to list what’s available:
List all blocks in this project.What Function Blocks are in the "Technology" program folder?The agent uses get_blocks and returns each block’s name, number, type (FB/FC/OB/DB), programming language, and folder path.
Reading block source
Section titled “Reading block source”Ask for any block’s source by name:
Read the source code for FB_MotorControl.Show me what OB35 does.Supported block languages:
- SCL — returned as-is from the project XML
- LAD / FBD — blocks that were originally written in Ladder or FBD and later exported to SCL (e.g. via the Ladder Migration workflow) are returned as SCL
- Blocks that are still natively Ladder/FBD are returned as structured pseudo-code reconstructed from the TIA Portal XML export
Reading block interface
Section titled “Reading block interface”What are the inputs and outputs of FB_MotorControl?List all the variables in the instance data of FC_PID with their data types and initial values.The agent uses get_block_interface and returns a structured view of:
- INPUT — parameters passed in at call time
- OUTPUT — parameters returned by the block
- IN_OUT — bidirectional parameters
- STATIC — instance data (FBs only)
- TEMP — local temporary variables
- CONSTANT — named constants
Explaining code
Section titled “Explaining code”Once the agent has read the source, it can explain it in plain language:
Explain what FB_MotorControl does, step by step.Pay particular attention to the fault handling and the restart interlock.Are there any potential issues with the timing logic in this block?This block was written by a previous engineer and I don't understand the state machine.Can you draw a plain-language flowchart of the states?Modifying blocks
Section titled “Modifying blocks”The AI Agent can create new blocks or modify existing ones if you give it clear instructions:
Create a new Function FC_FlowCalculation with two REAL inputs (FlowRaw, Gain) and one REAL output (FlowEng).The output should be FlowRaw * Gain. Use SCL.Add a new BOOL input called Enable to FB_MotorControl and gate the motor start output through it.Devices and network topology
Section titled “Devices and network topology”What devices are in this TIA Portal project?What IP addresses are configured for the PLCs?The agent uses get_devices to list all stations in the project (PLCs, HMIs, drives) and get_profinet_topology to return IP addresses, subnet masks, and subnet connections for each PROFINET interface. These are useful for mapping the network without opening TIA Portal’s hardware view.