DP to TrendRulerPanel.pnl

Find and share HowTos to various installations / configurations!
Search

Post Reply
4 posts • Page 1 of 1
Kirvesmies
Posts: 42
Joined: Mon Dec 04, 2017 2:28 pm

DP to TrendRulerPanel.pnl

Post by Kirvesmies »

Hi,
I'm sure this has been asked before, but I cannot find solution via search.

How can I get the DP-name also to the trendruler. As default is shows only DP's description, value and unit. I tried to look at the code in TrendRulerPanel.pnl but if I modify that, I'm afraid it will not work after upgrading WinCC versions without maintaining this code.

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: DP to TrendRulerPanel.pnl

Post by gschijndel »

I would expect the TrendRulerPanel to use the name of the curves, so setting the DP name to the curve should do the trick.

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: DP to TrendRulerPanel.pnl

Post by leoknipp »

The TrendRulerPanel uses the curve names to get the information which curves are displayed. It does not read the information for the DP elements assigned to a curve. You can also fill a trend without assigning a DP element.

Best Regards
Leopold Knipp
Senior Support Specialist

Kirvesmies
Posts: 42
Joined: Mon Dec 04, 2017 2:28 pm

Re: DP to TrendRulerPanel.pnl

Post by Kirvesmies »

Hi,
Yes thanks.
I added the third row to my code for adding curves to trend. Without it it defaults to naming the curve according to description only.

Code: Select all

  TREND1.addCurve( 0, "#1_1" );
  TREND1.connectDirectly( "#1_1", sDP );
  TREND1.curveLegendName( "#1_1", dpSubStr(sDP, DPSUB_DP) +", "+dpGetDescription(sDP));
  

Post Reply
4 posts • Page 1 of 1