Command ‘Call tree’

Symbol: e97c4a78798cce68c0a8646329524733_5d7e8a087ebe99f4c0a86463309b7395

Function: This command opens the Call tree view.

Call:

  • View 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:

../_images/57b7a13c91f6e366c0a86463402fc1b7
    1. Node <block name> is called by:
    1. Node <block name> calls:
Block name

Name of the program block; specified manually, by dragging from another view, or by means of the button e97c4a78798cce68c0a8646329524733_6e0b581d7ebfe926c0a864633ef591da .

The drop-down list includes the last specified block names.

Toolbar and keyboard usage
e97c4a78798cce68c0a8646329524733_7a66d6ba7ec6eb46c0a864630c8a1133 : Find block CODESYS searches for the block specified in Block name and displays its caller and calls.
e97c4a78798cce68c0a8646329524733_6e0b581d7ebfe926c0a864633ef591da : Use block from the input assistant The Input assistant dialog box opens for selecting a block call or instance call. The call tree is refreshed automatically after the selection.
e97c4a78798cce68c0a8646329524733_a061bb397ebf32ecc0a864635e0883aa : Show source code position of the selected block CODESYS jumps to the occurrence location of the block in the source code of the program.

F4: Show source code position of the next block

Shift+F4: Show source code position of the previous block

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