Command Call Tree

Symbol: Command Call Tree 1:

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:

Command Call Tree 2:

POU Name

The name of the program block can be entered manually, by dragging it from another view, or by using the Command Call Tree 3: button.

The selection list contains the last function block names entered.

Toolbar and keyboard operation

<Command Call Tree 4: Find function block

TwinCAT searches for the function block specified in "Function block name" and displays its callers and calls.

Command Call Tree 5: 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.

Command Call Tree 6: 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.

Command Call Tree 7: Show source code position of the next function block

Command Call Tree 8: 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.

Command Call Tree 9:

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.