Find Unused Blocks
Function
Find Unused Blocks analyzes your project and finds blocks that are never called.
Usage
- Connect to a project
- Open the Find Unused icon in the Activity Bar and click Run Find Unused (or run Find Unused from the Command Palette with
Ctrl+Shift+P). The Find Unused editor opens in the editor area. Find Unused is a Professional/Enterprise feature. Click Find Unused All in the action bar to start the scan. The analysis runs automatically:
- Phase 1: Collect blocks
- Phase 2: Export to XML
- Phase 3: Build call graph
- Phase 4: Find unreachable blocks
While scanning, Cancel is enabled and the action bar shows the current progress item. Clear resets the results.
Results
Results are organized in 8 result tabs, each showing a per-tab count:
Standard Blocks:
| Tab | Content |
|---|---|
| Functions (FC/FB) | Unused functions and function blocks |
| Data Blocks (DB) | Unused global data blocks |
| UDTs | Unused user-defined data types |
| Variables/Tags | Unused PLC tags |
Safety Blocks (marked in red):
| 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 |
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
With no results, Export to Text / Copy All show a "Nothing to export." message.
Settings
Find Unused options live in Settings (Ctrl+,). Type tiaPortal in the search box to filter to them.
Analysis Scope:
| Setting | Default | Description |
|---|---|---|
| Include Blocks (FC/FB) | On | Include functions and function blocks in the analysis |
| Include Data Blocks (DB) | On | Include global and array data blocks. Instance DBs are always linked to their parent FB |
| Include UDTs | On | Include user-defined data types. UDTs referenced by used blocks are marked as used |
| Analyze Tags | On | Include PLC tags in the call graph analysis |
Exclusions:
| Setting | Description |
|---|---|
| Excluded 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