The "List components" function is an input tool in textual editors to help you input valid identifiers. Activate this function by clicking “Tools Options” and then the “SmartCoding” category. Select the “List components after typing a dot (.)” option.
-
If you type a dot (
.
) instead of a global variable, then a list box opens with all available global variables. You insert the selected variable after the dot by double-clicking a variable in the list box or by pressing [Enter]. -
If you type a dot (.) instead of a global variable after a function block instance variable or a structure variable, then CODESYS opens a list box with all global variables, all input and output variables for the function block, or all structure members.
You insert the selected variable after the dot by double-clicking a variable in the list box or by pressing [Enter].
Note: When you also want to choose from the local variables of function block instances, select the “Show all instance variables in Input Assistant” option in the CODESYS options in the SmartCoding category.
-
If a component access (with a dot) for a list box has already happened, then the last selected entry is preselected at the next component access.
-
When you type any sequence of characters and then press [Ctrl]+[Space], a list box opens with all available POUs and global variables. The first element in this list that starts with the sequence of characters is selected by default and you can insert it by double-clicking it or by pressing [Enter].
Matches with the entered string are highlighted in yellow in the list box.
If the entered string is changed, then the displayed list box is refreshed.
-
In the ST editor, you can filter the displayed list box by scopes:
Depending on the displayed list box, you can use the [Arrow right] and [Arrow left] keys to toggle between the following list boxes:
-
“All items”
-
“Keywords”
-
“Global declarations”
-
“Local declarations”
-
-
CODESYS displays a tooltip if you type an opening parenthesis for a POU parameter when calling a function block, a method, or a function. This tooltip includes information about the parameters as they are declared in the POU. The tooltip remains open until you click to close it or you change the focus away from the current view. If you accidentally close the tooltip, then you can reopen it by pressing [Ctrl]+[Shift]+[Space].
You can use the pragma attribute ⮫ hide for excluding variables from the "List components" feature.
Examples
Typing structure variables:

Calling a function block:

For more information, see: ⮫ “Dialog: Options: SmartCoding ”