Executing A Method Of The Custom Widget - Siemens SINUMERIK 828D Commissioning Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Graphic and logic elements
7.4 Custom widgets
Custom widget class declaration:
class SLESTESTCUSTOMWIDGET_EXPORT SlEsTestCustomWidget
{
Dialog box configuration:
DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
PRESS(VS1)
END_PRESS
Example 2:
Write the result of the calculation "3 + sin(123.456)" into property "MyRealVar" of the custom
widget that is linked to dialog box variable "MyCWVar1."
Custom widget class declaration:
class SLESTESTCUSTOMWIDGET_EXPORT SlEsTestCustomWidget
{
Dialog box configuration:
DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
PRESS(VS1)
END_PRESS
7.4.5.2

Executing a method of the custom widget

Description
The function CallCWMethod is available in the Run MyScreens configuration for executing
methods of the custom widget.
The custom widget method to be called must have no more than 10 transfer parameters.
180
Q_OBJECT
Q_PROPERTY(QString MyStringVar
READ myStringVar
WRITE setMyStringVar);
...
REG[7]=ReadCWProperty("MyCWVar1", "MyStringVar")
Q_OBJECT
Q_PROPERTY(double MyRealVar
READ myRealVar
WRITE setMyRealVar);
...
WriteCWProperty("MyCWVar1", "MyRealVar", 3 + sin(123.456))
: public QWidget
: public QWidget
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents