show the entry list
WinCC (TIA Portal) -- Creating HMI configurations -- Working with tags
How can you access tags of an operator panel using an Excel application with WinCC (TIA Portal)?
How do you establish a connection between a LOGO! 0BA7 and an HMI Panel?
How do you specify the runtime for a timer via an operator panel, and how do you output the remaining runtime?
How do you create dynamic text lists in WinCC (TIA Portal)?
How do you migrate tags from STEP 7 V11 to WinCC V11?
How can you provide new tags for the separate trends of an f(t) trend display by means of a C or VB script in WinCC Runtime Professional V11 and higher?
How can you provide new tags for the separate trends of an f(t) trend display by means of a C or VB script in WinCC Runtime Professional V11 and higher?
Part number:

Description
With the scripts used here you can change the tag originally configured as data source of a trend during runtime.

Example
You have defined the "TagA" tag from the "TestArchive" process value archive as data source for the "Trend1" trend. Using the script now in runtime you can define the "TagB" tag as data source of the "Trend1" trend.

Instructions
Proceed as follows to use a C script to assign a trend a different tag from the process value archive.
 
No. Procedure
1 Set the "TrendName" attribute, which corresponds to the name of the trend in the f(t) trend display, for the trend whose data source you wish to change.

Function: SetPropChar

Example: SetPropChar( "Trends", "Control_1", "TrendName", "Trend1" );

2 Set the "TrendTagName" attribute of the trend previously defined to the new tag required.

Function: SetPropChar

Example: SetPropChar("Trends","Control_1","TrendTagname", "TestArchive\\TagB");

3 Complete sample script:
SetPropChar( "Trends", "Control_1", "TrendName", "Trend1" );
SetPropChar("Trends","Control_1","TrendTagname", "TestArchive\\TagB");
Table 01

Proceed as follows to use a VB script to assign a trend a different tag from the process value archive.
 
No. Procedure
1 Create the "obj" object for the f(t) message display.

Dim obj
Set obj = ScreenItems("Control_1")

2 Set the "TrendName" attribute, which corresponds to the name of the trend in the f(t) trend display, for the trend whose data source you wish to change.

obj.TrendName = "Trend1"

3 Set the "TrendTagName" attribute of the trend previously defined to the new tag required.

obj.TrendTagName = "TestArchive\TagB"

4 Complete sample script:
Dim obj
Set obj = ScreenItems("Control_1")
obj.TrendName = "Trend1"
obj.TrendTagName = "TestArchive\TagB"
Table 02

Keywords
Change data source, Change trend tag

 Entry ID:55741262   Date:2011-11-07 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour