Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
10 posts • Page 1 of 1
renelorenz
Posts:8
Joined: Fri Sep 04, 2015 11:01 am

Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by renelorenz »

i am facing a problem with a Bar-Trend (WinCC OA 3.15)
I moved a Bar trend (Balken_Trend on a panel. For first testing reasons i want to set a bar on the trend within initialize script.
I did it the same way as i found it in help.

**********
shape bt=getShape("Bar_Pause");
dyn_float x1=makeDynFloat(10,20);
dyn_float x2=makeDynFloat(30,40);
dyn_float y1=makeDynFloat(50,60);
dyn_float y2=makeDynFloat(70,80);
dyn_string c1=makeDynString("green","red");
dyn_string c2=makeDynString("blue","yellow");

setValue(bt,"data",x1,x2,y1,y2,c1,c2);
setValue(bt,"flush");

***********

Calling the panel results in this log-entry:
WCCOAui (1), 2017.02.02 09:47:13.122, CTRL, WARNING, 12/uim,
Module: mainModule_1
Panel: *path*\\SollIst.xml []
Script: Initialize
Line: 11, Objekt "Bar_Pause" vom Typ "BAR_TREND" kennt nicht das Attribut "data" für "setValue()"

Do i make something wrong here?

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

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by RudiKreiner »

Here is the code that we use for this:

dyn_float x1, x2, Act, Set;
dyn_string ColSet, ColAct;


... the variables get filled with data from datapoints elsewhere.......

this.data(x1,x2,Set,Act,ColSet,ColAct);
this.flush;



I'm not sure why the "this" notation should work any differen than setValue, but since it works for us you could give it a try.

nmnogueira
Posts:125
Joined: Thu May 05, 2011 12:59 pm

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by nmnogueira »

Confirm that you are using the PNL panel format, bacause the BarTrend widget is not supported in XML format.

renelorenz
Posts:8
Joined: Fri Sep 04, 2015 11:01 am

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by renelorenz »

Thanks for the reply.

Unfortunately both hints did not work.
As soon as i changed from xml to pnl format, the error message above does not arrise any more.
But no other error message arises now. The bar grap simply keeps empty.

I simply use exactly the same code from help

***
shape bt=getShape("Bar_Pause"); //Bar trend

dyn_float dx1, dx2, dy1, dy2;

dyn_string c1, c2;

//dx1 Start coordinate for the bar on the X-axis

//dx2 End coordinate for the bar on the X-axis

dx1=makeDynFloat(10,40);

dx2=makeDynFloat(40,70);

//Y value of the bar and Y coordinate of the line (green and red lines)
dy1=makeDynFloat(60,30);
dy2=makeDynFloat(70,30);

//c1 = Color array for the bars, c2 = Color array for the line dyn_string c1, c2;
c1=makeDynString("Gelb", "Blau");
c2=makeDynString("Green", "Rot");
Bar_Pause.toolTipText("Drueber");
setValue(bt, "data", dx1, dx2, dy1, dy2, c1, c2);
setValue(bt, "flush");
***

any other ideas which i should take care of?
is this problem reproducable?

best regards

nmnogueira
Posts:125
Joined: Thu May 05, 2011 12:59 pm

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by nmnogueira »

Please try to remove the BarTrend widget and insert it again. Or better yet, try with a new panel, always in PNL format!

renelorenz
Posts:8
Joined: Fri Sep 04, 2015 11:01 am

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by renelorenz »

I tried thatt, but no success at all...

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

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by leoknipp »

In the WinCC OA installation you will find some example panels for the bar trend in panels/examples/balken*.
When opening the panel "balken" in a Vision module you can open the other panels.

Maybe you can have a look at those panels to see how the bar trend works.

Best Regards
Leopold Knipp
Senior Support Specialist

renelorenz
Posts:8
Joined: Fri Sep 04, 2015 11:01 am

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by renelorenz »

I solved the issue.
I selected the refrence-position "average" for balken-type, which seems not to work in my case.
Changing the reference-position to another one than that solved the problem.

Sometimes it is very helpful to simply sleep on it and get back to it later on :-)

thanks!

renelorenz
Posts:8
Joined: Fri Sep 04, 2015 11:01 am

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by renelorenz »

But by the way Nuno was right: this trend does not work on xml-panels, only on pnl panels.

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

Re: Bar Trend does not know attribut \"data\" for \"setValue()\" (WinCC OA3.15)

Post by RudiKreiner »

That bar trends cannot be saved in xml format is noted in the help entry titled "XML conversion" as follows:

CAUTION
Note that the configuration of the shape bar trend cannot be converted to XML, so the bar trend should not be used inside a .xml panel.

We would very much like to be able to do this though, because we find the xml format easier to handle and all our other panels are in xml format, so we issued this service request: SR= 1-4174592696 that has the status "Engineering wait".
Our feedback from ETM is that it is not certain if and when this will be implemented.

10 posts • Page 1 of 1