Tips and tricks
B.1
General tips
● If possible, use the OPI version for system variables ($ variables).
Reason:
Avoids complex name resolution.
Example:
Instead of "$R[10]", it is better to use "/Channel/Parameter/R[u1,10]".
● Avoids cyclic (similar) setting, e.g. of the screen and variable HLP property. Compare the
value to be set with the current value first, and only set it when it is different.
Reason:
Avoid a time-consuming search of the resolution-dependent help screens.
Example:
DEF MyVar=(R3///,"X1",,"mm"/WR1//"$AA_IM[0]")
CHANGE(MyVar)
END_CHANGE
Recommendation:
CHANGE(MyVar)
END_CHANGE
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
IF MyVar.VAL < 100
HLP="mypic1.png"
ELSE
HLP="mypic2.png"
ENDIF
IF MyVar.VAL < 100
IF HLP <> "mypic1.png"
HLP="mypic1.png"
ENDIF
ELSE
IF HLP <> "smypic2.png"
HLP="mypic2.png"
ENDIF
ENDIF
B
207