Calling control code from EWO

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
3 posts • Page 1 of 1
a.decelis
Posts:30
Joined: Thu Jun 25, 2015 6:42 pm

Calling control code from EWO

Post by a.decelis »

Hi,

I am testing some features of WinCC OA 3.13 under Linux (CentOS 7).

My questions are: where/how do I put the function(s) to handle the EWO events (signal) in Control code? What about conversion/correspondence from Qt types to Control types?

Background:
I have already compiled the "2 buttons" EWO example.

In that example, comments in provided code state that Qt (EWO) signals are routed to the UI through the general signal "signal".
Thus, two different texts are emmited "clicked1" and "clicked2"
My guess is that UI gets a general signal and then (automatically?), based on the parameters received, the message (signal) results in a call to the appropriate control function.

After several trys and approaches, I just can't figure out where to place the Control functions clicked1() and clicked2(? time), nor the Control-type for the parameter for clicked2().
No Control function seems to be called.

Thanks for your attention.

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

Re: Calling control code from EWO

Post by mkoller »

When you place the example EWO into a panel in gedi and check the extended tab from the property editor you'll find the two CTRL functions being called:
clicked1 and clicked2

These functions get triggered by the EWO when it does
emit signal("clicked1");
or
emit signal("clicked2", QVariant(QTime()));

You can pass more or less all standard Qt datatypes which have a correspondence in WinCC_OA.
QColor, QFont, QPen, QBrush, QUrl are converted to string, QDate/QDateTime/QTime are converted to time
QPoint/QSize/QRect/QPolygon are converted to dyn_int/dyn_float
QStringList -> dyn_string, QVariantList -> dyn_anytype

If you pass a type which can not be converted, you should get an error message in the logfile

a.decelis
Posts:30
Joined: Thu Jun 25, 2015 6:42 pm

Re: Calling control code from EWO

Post by a.decelis »

I did not manage to see that extended tab until now. It works fine now.

Vielen Dank.

3 posts • Page 1 of 1