Regarding the Identification of edit mode and active mode of the panel

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
Pradeep Kumar
Posts:39
Joined: Fri Dec 09, 2016 2:54 pm

Regarding the Identification of edit mode and active mode of the panel

Post by Pradeep Kumar »

We have ewo to be show on panel, once we select adding ewo on to the panel, the instance is created constructors are getting called , and again when we run ewo on vision mode, again constructors are getting called, can we have the trigger from WinCC OA, how to distinguish between this two scenarios,

so only during the vision mode, the ewo has to be active.

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

Re: Regarding the Identification of edit mode and active mode of the panel

Post by leoknipp »

in CTRL you can get the own module name and the Vision/Gedi/Para names. By comparing this information you can know which module is actually used.
I'm not sure if you can get the same or a similar information in the EWO.

Why is it a problem that the EWO is also active in Gedi?

During runtime (on an operational system) the Gedi will not run on a UI computer.

Best Regards
Leopold Knipp
Senior Support Specialist

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Regarding the Identification of edit mode and active mode of the panel

Post by mkoller »

Check out the chapter on EWO in the help: qthelp://wincc_oa/doc/Native_GEDI/EWO.htm

inGedi()

Allows to define a different display behavior for EWOs inside the GEDI, e.g. to increase the visibility of the AttentionEffect.ewo inside the editor.

Q_PROPERTY(bool inGedi READ isInGedi WRITE setInGedi DESIGNABLE false SCRIPTABLE false)

Pradeep Kumar
Posts:39
Joined: Fri Dec 09, 2016 2:54 pm

Re: Regarding the Identification of edit mode and active mode of the panel

Post by Pradeep Kumar »

logs of sample template of ewo

drawing on panel
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, InterfaceWidget constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, WIDGET constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, WIDGET constructor ended :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, InterfaceWidget constructor ended :

Save and after running in vision mode
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, InterfaceWidget constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, WIDGET constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, WIDGET constructor ended :
WCCOAui1:WCCOAui (1), 2017.01.10 21:18:57.776, Qt, InterfaceWidget constructor ended :
WCCOAui (1), 2017.01.10 21:21:09.042, SYS, WARNING, 16/uim,
Panel: C:\\WinCC_OA_Proj\\WorkSpace\\panels\\newPanel.pnl []
Object: 0 named: "EWOWidget_ewo1" of type: EWOWidget_ewo
, Could not load ExternalWidgetObject "widgets/EWOWidget.ewo"
WCCOAui1:WCCOAui (1), 2017.01.10 21:21:10.894, Qt, InterfaceWidget constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:21:10.895, Qt, WIDGET constructor started :
WCCOAui1:WCCOAui (1), 2017.01.10 21:21:10.895, Qt, WIDGET constructor ended :
WCCOAui1:WCCOAui (1), 2017.01.10 21:21:10.895, Qt, InterfaceWidget constructor ended :

It seems that the Constructor for the widget is getting called twice.

We were trying to spawn threads from constructor, since it is getting called multiple times we have unnecessary instances of thread.
We only intend to spawn while the panel is running and not in edit mode.

Please suggest a mechanism if any to differentiate between edit mode and actual running mode.

4 posts • Page 1 of 1