Command ‘Call tree’¶
Symbol:
Function: This command opens the Call tree view.
Call:
- menu
- Context menu of a callable block in the Devices or POUs view.
View ‘Call tree’
The call tree is available at all times, even before compiling the application. It is a static representation of the caller and the calls of the block that you specify explicitly. Therefore, the tree always contains two root nodes above the respective call order is displayed as successive indented entries. Recursive calls are detected quickly in this tree representation.
Example of a call tree (1) for the (2) PLC_PRG block:
- Node <block name> is called by:
- Node <block name> calls:
Block name | Name of the program block; specified manually, by dragging from another view, or by means of the button The drop-down list includes the last specified block names. |
Toolbar and keyboard usage | |
![]() |
CODESYS searches for the block specified in Block name and displays its caller and calls. |
![]() |
The Input assistant dialog box opens for selecting a block call or instance call. The call tree is refreshed automatically after the selection. |
![]() |
CODESYS jumps to the occurrence location of the block in the source code of the program. |
|
The selection in the call tree jumps to the next or previous block in the call structure. At the same time, the associated source code position is opened in the respective editor. Note: Double-clicking an entry in the call tree also opens the associated source code position. |
Display of the call tree: | |
Symbol | <block name> is called by: The call order is displayed for below this node. The bottom entry in this tree structure shows the start of the calls. <block name> calls: The calls from this block are displayed below this node. The bottom entry in this tree structure shows the end of the call chain. |
Position | For the root node in the call tree: Line numbers of the declaration (Decl) of the block. For the caller or calls below the root node: Line number, column number, and network number of the position, depending on the implementation language. |
Context menu for the entry selected in the tree: | |
Collapse all | The expanded entries in the call tree are collapsed, except for the two root nodes. |
Show source position | CODESYS jumps to the occurrence location of the block in the source code of the program. |
Set as new root node | The entry selected in the call tree is displayed in Block name. The tree is refreshed automatically for the new root nodes. |
Note
The Call list view is provided for immediate information when stepping through a program, as opposed to the static call tree that provides call information about a block. The call list always shows the full call path of the current position that is reached.
See also