Siemens SINUMERIK 840DE sl Commissioning Manual page 1197

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Parameters:
Examples
Example 1:
Read property "MyStringVar" of the custom widget that is linked to dialog box variable
"MyCWVar1" and assign the value to register 7.
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)
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1
Variable name
Propertyname
Value
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))
Name of a dialog box variable to which a custom widget
is assigned
Name of the custom widget property to be written
Value to be written to the property of the custom widget
: public QWidget
: public QWidget
Graphic and logic elements
7.4 Custom widgets
211

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents