Going to a function block or program and setting the instance context
How to go from Instances view to an →instance or a →variable and how to set the →instance context for it:
-
Establish the connection to the PLC.
-
If the instance or variable is included within a collapsed level, expand this collapsed level.
-
Open the context menu for the instance or variable and select Open Instance. Alternative 1: Double-click the instance/variable. Alternative 2: Select the instance/variable and press the Enter-key.
The result depends on the programming language of the function block or program:Programming language
Result
The ST-viewer is opened for the instance or the variable. You are able to monitor the values of variables in this ST-viewer.
See "Opening of a larger POU for data debugging takes longer than expected. Scrolling and closing, too." for a restriction when opening the ST-viewer and working in it.The appropriate graphical editor is opened for the instance or the variable. The statusbar of the editor informs about its instance context. If the FBD-editor contains →OLT-fields, you are able to monitor the values of variables in them. Moreover, Boolean lines are animated in the graphical editor.
Depending on your Neuron Power Engineer configuration, it is possible that this FBD-editor is write-protected as well. So it might not be possible to change the logic in an FBD-editor with instance context.Alternative in order to open the editor in which the instance is used: Open the context menu for the instance and select Open Variable Declaration (Instance) or press Shift+Enter.
Example: If the instanceMyFB1
is declared/used withinProgram1
, the command Open Instance for the instanceMyFB1
opens the editor forMyFB1
, while the command Open Variable Declaration (Instance) opens the editor forProgram1
.
Good to know |
---|
These actions are relevant for a set instance context within the graphical editor: If you do not need the instance context any longer, just click in the status bar of the editor. Subsequently, the OLT-fields will not display values any longer. Moreover, the button removes a possible write-protection. Therefore, you will switch to an FBD-editor in which you are able to change the logic. It is possible to quickly go to the declaration of a block. When going to a declaration from within an FBD-editor, the instance context of the current FBD-editor is automatically transferred to the newly opened editor. The ST-viewer provides different possibilities to go to a declaration. Depending on the selected possibility, the instance context is transferred to the newly opened editor or an editor without instance context is opened. If you want to open an editor without the instance context, this is also possible from within the Instances view. Thus, a previous change to the project explorer is obsolete. See "Going to instance or variable (without instance context)".
Usually, an FBD-editor without instance context is used for editing while an FBD-editor with instance context is used for debugging. The default behavior of Neuron Power Engineer is that 2 different tabs can be opened for editing and debugging at the same time. The Object Browser view also provides the possibility to open an object without or with an instance context. The application navigator also provides the possibility to open an object without or with an instance context. |