• No results found

Working with Tags 4

4.7 Working with structures

4.7 Working with structures

4.7.1 Structure basics

Introduction

With structures you bundle a number of different tags that form one logical unit. Structures are project global data and apply to all HMI devices within the entire project.

Principle

For instance, the various states of a valve can be replicated by means of four tags.

With a structure, the different states can be united. Within the structure you set up a structure element for each tag. To the structure element you assign the properties that the tag created from it should include, e.g. data type.

4.7 Working with structures

You assign the generated structure a tag or a dynamic property of the faceplate as a data type. The structures that can be selected are displayed in the "Data type" list box following the standard data types.

Note

You can work with structures and tags of a structure data type only in the faceplates.

License regulation in Runtime

If you use external tags of the structure data type in a faceplate instance, in WinCC flexible Runtime, each structure element is counted as a tag.

Example

You have created two screens in the Screen Editor: Screen_1 and screen_2

3 faceplate instances are inserted in Screen_1 and 4 faceplate instances in Screen_2. Each faceplate instance is linked with an external tag of a structure data type. The structure contains 10 structure elements.

Screen 1: 3 faceplate instances * 10 structure elements corresponds to 30 external tags = 30 PowerTags.

Screen 2: 4 faceplate instances * 10 structure elements corresponds to 40 external tags = 40 PowerTags.

In WinCC flexible Runtime, 70 PowerTags are counted for both screens. This also applies to the structure elements that are not required.

4.7 Working with structures

4.7.2 Structures Editor

Introduction

You create the structures and structure elements in the Structures Editor. Structures are project global data and apply to all HMI devices within the entire project.

Open

Double-click on "Add structure" in the "Structures" group of the project view. A new structure is generated in the project view and the work area is opened with a new structure.

Structure

2EMHFWYLHZ

3URMHFWYLHZ

3URSHUW\YLHZ

:RUNDUHD

Work area

The structure elements are displayed in table form in the work area. You use the table cells to edit the properties of the structure elements. To sort the table by its column entries, simply click the column header.

You can show and hide the table columns. To do this, you activate or deactivate the entries in the pop-up menu of the table header.

Properties view

Configure the structure elements in the Properties view. The Properties view offers the same information and settings as the work area table.

4.7 Working with structures

4.7.3 Managing structures

Renaming structures

1. Under "Structures" In the project view select the structure that you wish to rename.

2. Select "Rename" from the shortcut menu.

3. Type in a new name.

4. Press <Enter>.

As an option, use the <F2> function key to rename the structure.

Copying and inserting structures

1. Under "Structures" In the project view select the structure you wish to copy.

2. Click the "Copy" icon on the toolbar.

3. Click the "Paste" icon on the toolbar.

As an option, use the "Copy" and "Paste" commands of the "Edit" menu or of the shortcut menu. These functions are also available by means of the <CTRL+C>

and <CTRL+V> keystrokes.

A copy of the original structure is generated in the project view and inserted in the work area.

The name of the structure is provided with a consecutive number.

Deleting structures

When deleting a structure the structure elements contained within it are also deleted.

1. Under "Structures" In the project view select the structure you wish to delete.

2. Click the "Delete" icon on the toolbar. If the structure to be deleted is being used in a faceplate, then a dialog appears. The dialog asks if you really want to delete the structure.

As an option, use the "Delete" command in the "Edit" menu or of the pop-up menu. You can also use the <DEL> key.

When deleting a structure the structure elements contained within it are also deleted.

The entry remains in the allocated tag. In the Tag Editor, a colored background denotes that by deleting a contradiction in the data type has occurred. Change the data type in the Tag Editor.

Renaming structure elements

1. Under "Structures" In the project view select the required structure.

The structure is opened in the Structures Editor.

2. Select the structure element that is to be renamed.

3. Select the "Rename" command from the shortcut menu.

4. Type in a new name.

5. Press <Enter>.

You can also use the <F2> function key to rename the structure.

4.7 Working with structures

Editing structure elements

1. Double-click the required structure in the "Structures" area of the project view.

The structure is opened in the Structures editor.

2. Highlight the structure element that is to be edited.

3. Change the properties of the structure element, e.g. the data type.

If you wish to change the properties of a structure tag, then you must always change the properties of the structure element.

Copying and inserting structure elements

1. Double-click the required structure in the "Structures" area of the project view.

The structure is opened in the Structures editor.

2. Highlight the structure element that is to be copied.

3. Click the "Copy" toolbar icon.

4. Click the "Paste" toolbar icon.

You can also use the "Copy" and "Paste" commands of the "Edit" or shortcut menu. You can also use the <CTRL+C> and <CTRL+V> keystrokes.

A copy of the original structure element is inserted in the work area. The name of the structure element is provided with a consecutive number.

Deleting structure elements

1. Double-click the required structure in the "Structures" area of the project view.

The structure is opened in the Structures editor.

2. Highlight the structure element that is to be deleted.

3. Click the "Delete" icon on the toolbar.

You can also use the "Delete" command from the "Edit" or shortcut menu. The <DEL> key can also be used.