Dialog box configuration:
DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
DEF MyStringVar1 = (S)
DEF MyRealVar = (R)
PRESS(VS3)
REG[9] = CallCWMethod("MyCWVar1", "myFunc1", 1+7, MyStringVar1, sin(MyRealVar) –
8)
END_PRESS
7.4.5.3 Response to a custom widget signal
Description
In Run MyScreens it is possible to respond to a particular signal (invokeSub()) of the custom
widget and call up a subprogram (SUB).
10 global variables, the so-called SIGARG, are available for passing values (custom widget
signal -> SUB), which are comparable to registers (REG) in configuration. This is where the
values transferred with the custom widget signal are stored.
The following transfer parameter data formats are supported:
●
bool
● uint
● int
● double
● QString
● QByteArray
Programming
Calling the subroutine:
Syntax: void invokeSub(const QString& rszSignalName, const
QVariantList& rvntList);
Description: Custom widget signal with which a Run MyScreens subprogram is called.
Parameters:
rszSignalName Name of the Run MyScreens subprogram to be called
rvntList QVariantList array for transferring parameters that are
stored in the global parameter SIGARG and which are
available in the configuration.
Maximum size: 10 elements
Data formats supported: see above
Note: The transfer parameters are always passed "By‐
Val," i.e. only the value and not, for example, the refer‐
ence to a variable is passed.
Graphic and logic elements
7.4 Custom widgets
SINUMERIK Integrate Run MyScreens
182 Programming Manual, 10/2015, 6FC5397-3DP40-5BA3