Command Call Tree
Symbol:
Function: The command opens the Call Tree view.
Call: Menu PLC > Window
Call Tree view
The Call Tree is available at any time before the application is compiled. It is a static representation of the callers and calls of the function block, which you can specify explicitly. This means that the tree always contains two root nodes, under which the respective call sequence is displayed as consecutive indented entries. Recursive calls are quickly recognizable in this tree view.
Example of a Call Tree (1) for function block (2) MAIN:
- (3) Node "<function block name> is called by:"
- (4) Node "<function block name> calls:"
POU Name | The name of the program block can be entered manually, by dragging it from another view, or by using the button. The selection list contains the last function block names entered. |
Toolbar and keyboard operation
< Find function block | TwinCAT searches for the function block specified in "Function block name" and displays its callers and calls. |
Take function block from Input Assistant | The Input Assistant dialog appears for selecting a function block call or instance call. The Call Tree is automatically updated after the selection. |
Display source code position of the selected function block | TwinCAT jumps to the point where the function block is used in the source code of your program. |
Show source code position of the next function block Show source code position of the previous function block | The selection in the Call Tree jumps to the next or previous function block in the call structure. At the same time, the corresponding source code position is opened in the respective editor. Double-clicking on an entry in the Call Tree also opens the corresponding source code position. |
Display of the Call Tree
Location | For the root nodes in the Call Tree: Line number of the declaration ("Decl") of the function block. For the callers or calls under the root node: Depending on the implementation language, line number, column number, network number of your position. |
Context menu for the entry currently selected in the tree
Collapse All | The expanded entries in the Call Tree are collapsed except for the two root nodes. |
Display source code position | TwinCAT jumps to the point where the function block is used in the source code of your program. |
Set as new root node | The entry selected in the Call Tree appears in "function block name". The tree is automatically adapted for the new root nodes. |
In contrast to the static Call Tree, which always provides call information for a function block, the Call Stack view is intended for immediate information during the step-by-step processing of a program. The Call Stack always shows the complete call path of the currently reached position. |