Trending, Passing Dynamic Values into the Trend Widget

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
BuckB
Posts:3
Joined: Tue Jul 12, 2016 11:44 pm

Trending, Passing Dynamic Values into the Trend Widget

Post by BuckB »

I've created a selection list, for my users to determine which measurements they desire to view in the trend. In turn they can then click a button which will open a child panel, displaying the values selected.
My issue is when I'm passing these variables I was required to build 6 parameters in the widget, and when any of the 6 are not in use, they create random values and causing issues in the graph.

Currently I'm using this, however I'm sure there is a better way.

ChildPanelOnCentralModal("trendtest.pnl",
"",
makeDynString("$T1:"+adds[1],"$T2:"+adds[2],"$T3:"+adds[3],"$T4:"+adds[4],"$T5:"+adds[5], "$T6:"+adds[6]));

... in the arrays are the corresponding addresses that represent the inputs the user selected.

in the widget the $T1 parameters are then represented in their own.

Any ideas or help would be great thanks!! Image
Attachments
select.PNG

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Trending, Passing Dynamic Values into the Trend Widget

Post by leoknipp »

Hello,

I'm not sure where the problem is.
In the trend you can add/remove curves dynamically. Then you can add only the number of curves needed.
When defining the trend widget you do not define any curve. When opening the panel you add new curves using the trend function "addCurve". The connection between the curve and the dp-element is made with the function "connectDirectly".
More detailed information for the trend attributes and functions can be found in the WinCC OA online help: CONTROL --> Control Graphics --> Trend functions.

Best Regards
Leopold Knipp
Senior Support Specialist

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Trending, Passing Dynamic Values into the Trend Widget

Post by Gertjan van Schijndel »

You could pass all trend dpes with a single dollar parameter separated for example by a '|' and in the panel use the function 'strsplit' to get back a list of dpes.

3 posts • Page 1 of 1