Finding Declarations¶
CODESYS provides the capability of searching the entire project for the definition location of a variable or function. The block that includes the definition opens in the editor with the marked declaration.
Finding the declaration of a variable
Requirement: You have opened a POU in the editor.
Set the cursor at an identifier in the implementation section.
Click
.- ⇒
The POU with the declaration opens in the editor with the variable definition marked. If the definition is located in a compiled library, then the respective block opens in the library manager.
Note
You can execute this command in both online and offline mode.
Examples
The following block includes a function block definition (fbinst
), a program call (prog_y()
), and a function block call (fbinst.out
):
VAR fbinst:fb1; ivar:INT; END_VAR prog_y(); ivar:=prog_y.y; res1:=fbinst.out;
If the cursor is located at prog_y
, then the command opens the program prog_y
in the editor.
If the cursor is located at fbinst
, then this command focuses in the declaration section at line fbinst:fb1;
If you set the cursor at out
, then this command opens the function block fb1
in its editor.
See also