Find Unused Blocks
On this page
Function
Find Unused Blocks analyzes your project and finds blocks that are never called.
Asking the assistant
For the plain list of what nothing uses, you can ask the assistant in the chat, which answers in seconds without a scan. This page remains the way to delete and export unused blocks, and it finds what no organization block reaches, for example a function block whose instance data block nobody calls.
Usage
- Select the Find Unused icon in the Activity Bar (the search-stop icon on the left edge). The Find Unused page opens straight away in the editor area, and the Side Bar stays as it is. You can also run Find Unused from the Command Palette (
Ctrl+Shift+P) or pick Find Unused in the View menu. Opening the page does not start a scan yet. Find Unused is a Pro feature (Pro and above). - If no TIA project is connected, the page shows "Connect to a TIA project to find unused blocks, data types and tags." with a Connect button, and Find All Unused is unavailable. Select Connect to connect to TIA Portal; the page follows the connection and then shows "Select Find All Unused to scan the connected PLC."
- Click Find All Unused in the action bar to start the scan. This works right away, even if you have not opened the Project Explorer yet. While scanning, a progress notification reports the current step (the export progress, followed by an Analyzing… status) and Cancel is enabled in the action bar. Clear resets the results.
Results
Results are organized in 8 result tabs, each showing a per-tab count:
Standard Blocks:
| Tab | Content |
|---|---|
| Functions | Unused functions and function blocks (FC/FB) |
| Data Blocks | Unused global data blocks (DB) |
| UDTs | Unused user-defined data types |
| Tags | Unused PLC tags |
Safety Blocks (grouped into their own tabs; deleting them triggers a stronger confirmation):
| Tab | Content |
|---|---|
| Safety Functions | Unused FFC/FFB blocks |
| Safety DBs | Unused F_DB blocks |
| Safety UDTs | Unused safety data types |
| Safety Tags | Unused safety tags |
Results belong to the project they were scanned on. Connecting a different project clears them. While no project is connected, the results stay visible, so you can still export or copy them, but the delete actions are unavailable.
Compare with EPLAN
When your plan includes the EPLAN integration (Pro+), an EPLAN tab appears after the scan. It compares the input and output tags of the scanned PLC with the signals of the EPLAN project that is open in EPLAN, and lists each difference with its status, name, address, EPLAN device and EPLAN page:
- In EPLAN, not in TIA: EPLAN books a signal on an address that no tag of the PLC carries, for example a sensor that was drawn but never created as a tag. A second signal that EPLAN books on an address already taken shows here as well.
- In TIA, not in EPLAN: a tag with an input or output address that the schematic does not know, for example a spare tag or a tag whose address was changed on one side only.
- Wired in EPLAN, not used in the program: an unused tag that EPLAN still wires to a device. Such a tag is usually a missing piece of program rather than something to delete.
Addresses are matched the way both tools write them, so %IX7.0 in EPLAN meets %I7.0 in TIA Portal. Memory tags and tags without an address are not part of the comparison. Double-click a row with a page to open that page of the schematic. In the Tags and Safety Tags tabs, an unused tag that EPLAN wires carries the badge Wired in EPLAN with its device, so you can see at a glance which tags to keep.
If Studio is not connected to EPLAN or no EPLAN project is open, the tab says so and fills itself as soon as you open the project; you do not need to scan again. Changes in EPLAN update the tab as well.
You can also ask the assistant in the chat, for example "Which EPLAN signals does the program of PLC_1 not use?". It runs the same comparison for the PLC you name and answers with the three lists. This needs TIA Portal connected; a project opened offline is not enough.
Actions
Select rows in the active result tab (multi-select) and use the left toolbar. Each delete first asks for confirmation, then shows progress with a working Cancel; on completion a notification reports how many items were deleted, the deleted rows vanish from the list, and the summary counts drop. Cancelling mid-run keeps already-deleted items removed and stops the rest.
Selection:
- Delete Selection - Deletes the rows currently selected in the active tab
Delete by Category:
- Delete Blocks - Delete all unused FC/FB
- Delete Data Blocks - Delete all unused DBs
- Delete UDTs - Delete all unused data types
- Delete Tags - Delete all unused tags
Delete Safety (with stronger warning):
- Delete Safety Blocks - Delete all unused FFC/FFB
- Delete Safety DBs - Delete all unused F_DBs
- Delete Safety UDTs - Delete all unused F_UDTs
- Delete Safety Tags - Delete all unused F_Tags
Export:
- Export to Text - Exports the whole unused list as a text file (a notification names the saved file)
- Copy All - Copies the whole unused list to the clipboard
Both also include the comparison with EPLAN when the EPLAN tab has results. Delete Selection does nothing while the EPLAN tab is active, because its rows are not items of the project.
With no results, Export to Text / Copy All show a "Nothing to export." message.
Settings
Find Unused options live in Settings (Ctrl+,) in the Find Unused category.
Scan Scope:
Include Blocks (FB, FC)
- Default
- On
- Description
- Include functions and function blocks in the analysis
Include Data Blocks
- Default
- On
- Description
- Include global and array data blocks. Instance DBs are always linked to their parent FB
Include UDTs
- Default
- On
- Description
- Include user-defined data types. UDTs referenced by used blocks are marked as used
Include Tags
- Default
- On
- Description
- Include PLC tags in the call graph analysis
Exclusions:
| Setting | Description |
|---|---|
| Excluded Name Patterns | Wildcard patterns. Items matching any pattern are hidden from the results. Use * for any characters, ? for a single character, case-insensitive. |
All settings are saved automatically and persist across restarts.
Notes
- OBs (Organization Blocks) are never marked as "unused" since they are entry points
- Safety blocks require Safety login for complete analysis
- Deleting safety blocks requires confirmation due to safety implications