7.4.5 Interaction between custom widget and dialog box - Manual data exchange
Besides
automatic data exchange, manual data exchange is also possible. Data exchange is
dynamic, i.e. takes place while the dialog box is running. The following actions are possible:
● Properties of the custom widget can be read and written.
● Methods of the custom widget can be called from the Run MyScreens configuration.
● A response to a particular signal of the custom widget can be implemented in order to call
subprograms (SUB) in the Run MyScreens configuration.
7.4.5.1 Reading and writing properties
Description
The functions ReadCWProperties and WriteCWProperties are provided in the Run MyScreens
configuration for reading and writing properties of the custom widgets.
Programming
Syntax:
ReadCWProperty
("Variablename", "Propertyname")
Description: Reading a property of a custom widget
Parameters:
Variablename Name of a dialog box variable to which a custom widget
is assigned
Propertyname Name of the custom widget property to be read
Return value: Current value of the custom widget property
Syntax:
WriteCWProperty
("Variablename", "Propertyname", "Value")
Description: Writing the property of a custom widget
Parameters:
Variable name Name of a dialog box variable to which a custom widget
is assigned
Propertyname Name of the custom widget property to be written
Value Value to be written to the property of the custom widget
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.
Graphic and logic elements
7.4 Custom widgets
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3 179