Command: Call Tree
Symbol:
Function: The command opens the Call Tree view.
Call:
Menu
Context menu of a callable POU in the Devices view or POUs view
View: Call Tree
The call tree is available at all times, even before the application is compiled. It is a static representation of the caller and the calls of the POU which you specify explicitly. As a result, the tree always contains two root nodes, and below them 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 a POU (2) PLC_PRG
:
Node (3): <POU name> is called by
Node (4): <POU name> calls

POU name | Name of the POU Can be specified manually, or by dragging it from another view, or by using the The list box includes the last specified POU names. |
Toolbar and keyboard usage | |
| CODESYS searches for the POU, which is specified in POU name field, and displays its caller and calls. |
| The Input Assistant dialog opens for selecting a POU call or instance call. The call tree is refreshed automatically after the selection. |
| CODESYS jumps to the occurrence location of the POU in the source code of the program. |
F4: Show source position of next POU Shift + F4: Show source position of previous POU | The selection in the call tree jumps to the next or previous POU 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 | <POU name> is called by: The call order for the POU is displayed below this node. The bottom entry in this tree structure shows the start of the calls. <POU name> calls: The calls which originate from this POU 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: Row numbers of the declaration (Decl) of the POU For the caller or calls below the root node: Row number, column number, and network number of the location, 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 POU in the source code of the program. |
Set as New Root | The entry selected in the call tree is displayed in POU name. The tree is refreshed automatically for the new root nodes. |
Tip
Different from the static Call Tree, which provides call information about a POU, the Call Stack view is provided for immediate information when stepping through a program. The Call Stack always shows the full call path of the current position that is reached.
For more information, see: Call Stack