Trend AutoScale for archived values not working

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
8 posts • Page 1 of 1
dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Trend AutoScale for archived values not working

Post by dbindernagel »

Hello,

I have a problem with the variable trend and the autoscale setting not working for archived values.

WinCC OA 3.14 P10
Can reproduce it with the DemoApplication_3.14 (But I have the problem also with other projects)

If I add a variable with archived values and autoscale active the value axis is not scaled to the highest and lowest archived value (visible on the trend).
It does not matter if the time range is open or closed.
If the trend is already open and I change the value the autoscale works and the value axis is adjusted to the new value (if I have multiple curves then the autoscale is only applied to the changed curve).

Any help is appreciated.

Best regards
Dennis Bindernagel

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

Re: Trend AutoScale for archived values not working

Post by leoknipp »

I tested it with WinCC OA 3.14 and 3.15.
It looks like the autoscale in trend is not made when scrolling into the past. The autoscale is only made when the current time stamp is in the visible range of the trend.

Best Regards
Leopold Knipp
Senior Support Specialist

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Trend AutoScale for archived values not working

Post by RudiKreiner »

Is that a bug that is going to be fixed?

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

Re: Trend AutoScale for archived values not working

Post by leoknipp »

The trend works as designed in this case.
If the current time is outside of the visible area the scale is not modified automatically when changing the displayed time range.

E.g. in the following situation doing an "auto scale" will not be useful:
-- "Zooming" into a special part of the trend to analyze the values
-- Changing the time range to see more/less values

If now the scale is modified automatically to user has to zoom again.

Best Regards
Leopold Knipp
Senior Support Specialist

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: Trend AutoScale for archived values not working

Post by dbindernagel »

Thanks for the reply but I have a follow up questions.

Our customer has variable trends with e.g. the setting "Time range: 5) Trend last week closed".
In PVSS 3.9 on opening these trends the autoscale setting would be applied to the values displayed.
In newer versions this is not anymore the case (the scale does not match the displayed values, e.g. is set to 1-100).

Does this behavior apply to your description? I'm unsure if I understood it correctly.

Currently the behavior seems like a bug to me. Is there any way to get the old behavior back (some hack to get the trend to apply the autoscale setting after opening the trend manually for archived values)?

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

Re: Trend AutoScale for archived values not working

Post by leoknipp »

You have to differ between the trend widget and the function called "Variable Trend".
My previous answers are related to the trend widget and not the Variable Trend.

When opening a closed time range in the Variable Trend the data is read from the database and then added to the trend by CTRL commands.
In that case the "auto scale" function of the trend is not used and the scale range is calculated in CTRL.

Have you tested in 3.15 that the displayed scale range is not correct when using a closed time range?

Best Regards
Leopold Knipp
Senior Support Specialist

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: Trend AutoScale for archived values not working

Post by dbindernagel »

I installed WinCC 3.15 and did some additional testing with all versions.

Setup:
As a project I used the demo application that came with the corresponding version and created the same test setup.

Created new DPT with just a float value, added multiple datapoints of that type and added an archive handling for archive 01) 5 minute values.
Used a script to create a step curve with step 5, interval 1 second, ranges 0-50, 0-100, 0-150.
(At first I only used range 0-100 and everything looked good until I noticed that this is the default scale displayed.)

Created a new trend with 1 curve with autoscale (System Management > Reports > Variable Trend) and the time range setting set to "6) Trend defined timerange closed".

If the selected start and end times result in the trend still displaying the current time than the autoscale works in all versions.
If the current time is not visible on the trend window than the autoscale works only in PVSS 3.9
It is not relevant that the start and end times do not include the current time, only that it is visible on the trend.
(e.g. the trend will always display at least an hour? at first and if the end time is 5 minutes in the past and the diff between start and end is small the current time will be visible in the trend window despite not entered in the time range.)

PVSS 3.9
Current time visible in trend: Autoscale works
Current time not visible in trend: Autoscale works

WinCC OA 3.14 P010
Current time visible in trend: Autoscale works
Current time not visible in trend: Autoscale does not work

WinCC OA 3.15 P009
Current time visible in trend: Autoscale works
Current time not visible in trend: Autoscale does not work

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: Trend AutoScale for archived values not working

Post by dbindernagel »

Following the remark that the archived data is added to the trend with CTRL commands I compared 3.9 and 3.14 (Result is the same for 3.15) and found the following change:

Panel:
vision\\trend\\VT_trend.pnl
Object: [Panel]
Script: Initialize
Line: 1083

WinCC OA 3.14

Code: Select all

// in case of autoscale the values min and max are set to 0
if ((min>=max || CurveScale[groups[i][1]]=="AUTO:") && dynlen(dfValues)>0)
{
  min=0;
  max=0;
}
PVSS 3.9

Code: Select all

if ((min>=max || CurveScale[groups[i][1]]=="AUTO:") && dynlen(dfValues)>0)
{
  min=dynMin(dfValues);
  max=dynMax(dfValues);
}
Reverting the change back to the 3.9 version makes the autoscale work again for archived values.
I'm still a bit unsure about possible side effects by reverting this change but it looks like it was made without considering archived values.

8 posts • Page 1 of 1