Panel opens through time

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
Victoria
Posts:1
Joined: Wed Feb 10, 2021 1:29 pm

Panel opens through time

Post by Victoria »

Hello to all.

I've faced a specific problem, which got me in stuck.

In my project on WinCC OA 3.15 I have main panel with a table and the embedded module 1. The table contains a list of items. When an item is clicked the root panel "Panel1" opens in the embedded module 1. That works normally.
But if "Panel1" contains the embedded module 2, in which the root panel "Panel2" opens, the "Panel1" opens when an item is clicked, but "Panel2" appears in it exactly every other time. It doesn't depend on a particular item.

Here is snippet of code of the main panel ("Clicked" event of the table):

dyn_string t=strsplit(myModuleName(),"_");
string nameModule="Module0"+t[2];
int ID;
getValue( "ID",ID);
int ColumnNickName=strpos(column,"NickName");
if (ColumnNickName==0)
{
string msg2 = getCatStr("Object", "Vehicle");
RootPanelOnModule("Panel1.xml",msg2+(string)ID,
nameModule,makeDynString("$dpParameter:Vehicle_"+(string)ID));
}


This is code of the Panel1 ("Initilize" event of the embedded module 2):
main()
{
int ID;
string NP;
dyn_string t=strsplit(myModuleName(),"_");
string mn="Module"+myModuleName();
dpGet ("SelectedID.VehicleID",ID);
this.ModuleName = mn;
RootPanelOnModule("Panel2.xml","state"+(string)ID,mn,makeDynString("$Editable:FALSE","$dpParameter:Vehicle_"+(string)ID));
}

Any ideas appiciate.

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

Re: Panel opens through time

Post by gschijndel »

From your post it is not very clear what happens and is supposed to happen. But perhaps this helps anyway.
The 'Panel1' is opened with a dollar parameter (containing some ID), but it also does a 'dpGet' to retrieve an ID. This seems a bit redundant and since I do not see that the datapoint element is set, it would always open 'Panel2' with the same ID.

2 posts • Page 1 of 1