Tips and tricks
B.3 Tips for the CHANGE method
● Replace several RNP() functions in succession with one MRNP() function.
Replace several RDOP() functions in succession with one MRDOP() function.
Reason:
Reduces the communication load and increases the performance.
● Do not read drive parameters faster than in a 1 second cycle, slower is better.
Reason: The communication with the drives can otherwise be extremely disturbed or even
cause failures.
● Avoid successive arithmetic operations with system or user variable-connected dialog
variables. Use, for example, register (REG[x]) or (invisible) help variables for this.
Reason: Each assignment of a value results in a write operation in the connected system
or user variable.
● Similar code used in different blocks should be combined in a SUB block for reasons of
transparency, serviceability and performance (when displaying the screen). It can then be
called at the appropriate positions with the CALL() function.
● By monitoring the CPU load in the dialog line (setting in slguiconfig.xml), it is possible to
investigate the effects of changes in the screen on the performance.
B.2
Tips for debugging
● Use the DEBUG() function for diagnostic purposes. When the DEBUG() function is called,
the transferred string is written to the easyscreen_log.txt file. The output of information in
the dialog line by the DLGL() function can also be helpful.
However, after completion of the screen development, this function should be removed
again for performance reasons or commented out.
● The easyscreen_log.txt file should have no entries after the development of a screen is
completed.
B.3
Tips for the CHANGE method
● Always keep CHANGE methods very short and small, particularly for those whose variables
are connected to a system or user variable and change very frequently.
Reason:
Increases the screen performance.
● If possible, do not configure any RNP() functions in CHANGE methods. Instead, it is better
to configure an invisible variable parallel to the system or user variable to be read and then
use this.
Reason:
An RNP() function would be issued with each call. Otherwise, the current value which is
already available would be simply accessed.
208
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3