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:

  1. Establish the connection to the PLC.

  2. If the instance or variable is included within a collapsed level, expand this collapsed level.

  3. 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

    →ST

    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.

    →FBD or →LD

    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.
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Depending on your logi.CAD 3 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 instance MyFB1 is declared/used within Program1, the command Open Instance for the instance MyFB1 opens the editor for MyFB1, while the command Open Variable Declaration (Instance) opens the editor for Program1 .

Good to know

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg 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 images/download/thumbnails/414778829/DeleteFilterText-version-1-modificationdate-1534404785078-api-v2.png 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.
    images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Afterwards, if you want to return to the FBD-editor with instance context that might be write-protected again, just click images/download/thumbnails/414778829/DeleteFilterText-version-1-modificationdate-1534404785078-api-v2.png again.

  • 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.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg 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)".

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg The Object Browser view also provides the possibility to open an object without or with an instance context.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg The application navigator also provides the possibility to open an object without or with an instance context.