Professional Documents
Culture Documents
WinCC license If the elements of the structure are external, each element counts as a powertag
related to the required WinCC license.
Other dynamizations
All types of dynamization can be used. The procedure above applies analogously
to dynamic dialogs, C scripts etc.
In contrast to the scripts, in the dynamic dialog a check is made to establish
whether the tag used also exists in the tag management. A tag ".actual_speed" will
however not exist so that a box with a corresponding note appears. This box can
be closed with the " Ignore" button.
If the values of Motor2 also need to be displayed, the upper picture window must
be copied and only the tag prefix property changed to "Motor2".
Other useful properties are "Movable" (the operator can move the picture window
with the mouse) and "Closable" (an X is displayed at the top right in the picture
window).
// Internal Functions/graphics/set/miscs
SetTagPrefix(lpszPictureName,"Picture Window3","Motor2");
2. Add a direct connection to update the title automatically (for details, see the
slide "Automatic titles for picture window").
3. Add a button with the label "Motor1". Configure a VB script OR a C script to
switch the tag prefix to "Motor1" (for details see the slide "One picture window
to display several structure tags").
4. Create a copy of the Motor1 button and adapt it for Motor2.
Change the labeling and the script.
5. Test the required functionality in runtime.
Example:
On the controller, there is an FB (function block) for controlling a motor. In the
corresponding instance data block, the data for the relevant motors is stored. The
structure of these instance data blocks can be reproduced in WinCC.
To do this, the "External" property must be enabled for the structure type
elements. In addition to this, an "AS offset" (byte address) and "AS offset bit" need
to be specified.
In the structure tags, the start address of the data needs to be set.
The structure tag elements are created automatically by WinCC and the
addresses are calculated from the start address and the offset.
Note The example above was not created by the configuration engineer but by the tool
"Compile OS". This is only possible with integrated WinCC projects.
Example:
Tag prefix is "Motor1", tag on the I/O field is "@CurrentUser"
In runtime WinCC attempts to access "Motor1@CurrentUser" -> this tag very
probably does not exist
Solution:
Tag prefix is "Motor1", tag at the I/O field is "@NOTP::@CurrentUser"
WinCC displays "@CurrentUser" in runtime because the prefix @NOTP (No Tag
Prefix) turns off the tag prefix.
Now, if for example a further element is added to the structure type, the structure
tags are now automatically adapted and the new element is added to all existing
structure tags.
Additional options
Within a faceplate type, faceplate-internal tags can be created (Edit -> Edit
Faceplate Tags).
It is also possible to create dynamizations within the faceplate type. Direct
connections of tags from tag management, direct connections, dynamic dialogs, C
scripts are not possible. Only VB scripts can be used.
For this reason dynamizations are often made "from the outside" on the faceplate
instance (see the following pages).
With the events, the mouse click was selected for both buttons.
Effective configuration
If an instance for a second motor now needs to be dynamized, it would not be
effective if several individual tags needed to be linked again and VB scripts
needed to be written.
It is easier simply to copy the instance with dynamizations and then use the "Link"
function to adapt the tag names from Motor1... to Motor2... This also works for tags
used, for example, in C or VB scripts (keep to the rules for cross reference).
Effective configuration
With this linking function, entire pictures with many objects can be linked. This also
works for tags used in dynamic dialogs, C or VBS scripts (keep to the rules for
cross reference) or in direct connections.