Bar Trend Error

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
4 posts • Page 1 of 1
jjang@gtd.eu
Posts: 30
Joined: Fri Aug 23, 2019 12:55 pm

Bar Trend Error

Post by jjang@gtd.eu »

Hi,

I'm trying to use a Bar Trend. So I create a dyn_float DP in PARA and I wrote the following command (easy and simple command):

---------------------------------SCRIPT-------------------------------

─// [balken] [1] - [RotateAngle]
main()
{
dpConnect( "work", "ExampleDP_bt.bt1:_original.._value" );

}

work( string dp, dyn_float y )
{
setValue( "balken", "data", y );

setValue( "balken", "flush" );

DebugTN("Ha entrado aqui");

}


─// [NEWDATA] [2] - [Clicked] <-- It is a PUSHBUTTON
main(mapping event)
{
dyn_float random_value;
for(int i=1;i<=24;i++)
{
float random_aux;
random_aux=(rand()/16000)-0.5;
random_value=random_aux;
}
dpSet("ExampleDP_bt.bt1:_original.._value",random_value );
}

---------------------------------SCRIPT-------------------------------

But I does not work and in Log Viewer says that Object "balken" of type "BAR_TREND" does not know the attribute "data" for "setValue()".

I don't understand why it does not work because the example panel of WinCC OA uses the same function and it works.

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

Re: Bar Trend Error

Post by leoknipp »

Depending on the type of bar trend you are using the attribute "data" requries 1 or several variables.
Did you check that you are using the bar trend type which fits "data" with only 1 variable?

Please take into account that the bar trend has some limitations, e.g it cannot be used in panels using the xml format.

Best Regards
Leopold Knipp
Senior Support Specialist

jjang@gtd.eu
Posts: 30
Joined: Fri Aug 23, 2019 12:55 pm

Re: Bar Trend Error

Post by jjang@gtd.eu »

Oh.. I'm using XML format of panels... so it must be the problem...

Is there any way to make this problem available?

Thank you so much...

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

Re: Bar Trend Error

Post by leoknipp »

There are no plans to support the bar trend in xml panels.
If you want to use the bar trend you have to save the panels in pnl format.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
4 posts • Page 1 of 1