Layers - Example 2

To set up a digital object to control the active views:

  1. Select Template -> Create.

  2. Under Type, select Digital and in the Name field type "VIEW_CONTROL".



  3. Click OK. The Properties dialog box is opened for the new digital object template.

  4. Select the Atom Mapping tab and set the Command and State atoms as Local.

  5. Select the States and Commands tab. Change the names of the two states and commands to "Manual Off" and "Manual On" (see illustration below).



    Note
    It is important to know the sequence of the defined views in order to associate the correct digital states to the respective views. The listed order of states, given above, will match the sequence in the list of our created views, shown in the Views menu.
    For more info see: "Controlling Views with Digital Objects or VBA"

  6. Click OK. The digital object template is now created. Next we will create a digital object based on the object template.

  7. Select Objects -> New Unreferenced (or press Ctrl+6). The Object Browser window is now opened.

  8. Create a new digital object based on the VIEW_CONTROL object template. In the Name field type "ViewControl1" and in the Description field type "Controlling of the diagram view".

  9. Click Create. The Properties dialog box is opened for the new digital object.

  10. We will not change anything here so simply click OK.

  11. To enable this digital object to control the diagram views, select Diagram -> Diagram Properties.

  12. Click the Controlling Object button.



  13. Select the Views Controlled by Object check box.

  14. Click the Browse button, locate the ViewControl1 digital object and click Open/Select.



  15. Click OK.

    The digital object, ViewControl1, has now been set up to control the active view for the diagram. This digital object can now be controlled either from a PLC or by the operator

  16. Save and install the configuration.

  17. Test the functionality in Supervise.