Programming
A block is structured in the following way:
Syntax: //B(
Block name
)
SUB
(Identifier)
END_SUB
[SUB(
Identifier
)
...
END_SUB]
...
//END
Description: Defines a subprogram
Parameters: Block name Name of block identifier
Identifier Name of subprogram
Example
//B(PROG1) ; Block start
SUB(UP1) ; Start of subprogram
...
REG[0] = 5 ; Assign value 5 to register 0
...
END_SUB ; End of subprogram
SUB(UP2) ; Start of subprogram
IF VAR1.val=="Otto"
VAR1.val="Hans"
RETURN
ENDIF
VAR1.val="Otto"
END_SUB ; End of subprogram
//END ; Block end
6.3.4 Check Variable (CVAR)
Description
You
can use the CVAR (CheckVariable) function to run a scan to ascertain whether all or only
certain variables or Help variables in a screen form are error-free.
It may be useful to check if variables contain a valid value before an NC code with the GC
function.
A variable is error-free if the state of the variable Identifier.vld = 1.
Programming commands
6.3 Functions
SINUMERIK Integrate Run MyScreens
112 Programming Manual, 10/2015, 6FC5397-3DP40-5BA3