 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
javadctrl Junior


Joined: 23 Sep 2014 Posts: 3
|
Posted: 30/03/2020 18:47 Post subject: Wincc function trend control |
|
|
hi all
I use a function trend control to show X and Y float tag from archive tag.
Tags save in tag logging Continuous.
I want to use a button to clear function trend.
I use below c script in button action but it not work for archive tag logged
SetPropBOOL("PictureName.Pdl", "Control1", "DeleteData", TRUE);
In fact I want when I start the test, clear function tend control .
Pleas guide me how to do it...
i really need do it... |
|
| Back to top |
|
 |
dyvwa Junior

Joined: 22 Aug 2018 Posts: 2
|
Posted: 09/04/2020 11:24 Post subject: |
|
|
You will need to set the Index property for each trend and then issue the DeleteData command. For example, if your trend control had three pens :
| Code: |
SetPropWord(lpszPictureName, "Control1", "Index", 0);
SetPropBOOL(lpszPictureName, "Control1", "Index", 1);
SetPropWord(lpszPictureName, "Control1", "Index", 1);
SetPropBOOL(lpszPictureName, "Control1", "Index", 1);
SetPropWord(lpszPictureName, "Control1", "Index", 2);
SetPropBOOL(lpszPictureName, "Control1", "Index", 1) |
or
| Code: | dd = GetPropBOOL(lpszPictureName,"Control2", "DeleteData");//Return-Type: BOOL
if (dd == 0)
SetPropBOOL(lpszPictureName, "Control2", "DeleteData", 1);
else
SetPropBOOL(lpszPictureName, "Control2", "DeleteData", 0);
printf("Delete data = %d\n",dd); |
look also on
Creating an f(x) Trend View for Comfort Panels and WinCC Runtime Advanced
https://support.industry.siemens.com/cs/document/109481693/creating-an-f (x)-trend-view-for-comfort-panels-and-wincc-runtime-advanced
An f(x) trend view in WinCC Comfort/Advanced always offers this option. However, it is not independent in terms of time, since the value pairs of x and f(x) are assigned based on the recorded time stamp.
When using an f(x) trend view there are therefore the following restrictions:
Both time stamps of the value of a pair have to be absolutely identical.
Archive tags have to be acquired “cyclically-continuously”, when archiving “On demand” (different time stamps) there is no display.
Array tags are not supported.
The script ensures that in the tag archive
two arrays of real values (X value and Y value) are stored in the controller as a series of individual values.
the individual value pairs are stored with an identical time stamp.
the values can be archived “On demand”.
the structure is according to a standard archive.
This application example on hand offers you the following advantages
Time and cost savings through ready-programmed functions.
Expandability regarding own requirements
No restrictions of the f(x) trend view
Can be used for Comfort Panels and WinCC Advanced RT
https://support.industry.siemens.com/cs/attachments/109481693/109481693_DOC_v10_en.pdf
https://support.industry.siemens.com/cs/attachments/109481693/109481693_CODE_v10.zip |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|