Siemens SINUMERIK 840DE sl Commissioning Manual page 1128

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Programming commands
6.3 Functions
Programming
A block is structured in the following way:
Syntax:
Description:
Parameters:
Example
//B(PROG1)
SUB(UP1)
...
REG[0] = 5
...
END_SUB
SUB(UP2)
IF VAR1.val=="Otto"
ENDIF
VAR1.val="Otto"
END_SUB
//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.
142
Block name )
//B(
(Identifier)
SUB
END_SUB
Identifier )
[SUB(
...
END_SUB]
...
//END
Defines a subprogram
Block name
Identifier
VAR1.val="Hans"
RETURN
Name of block identifier
Name of subprogram
; Block start
; Start of subprogram
; Assign value 5 to register 0
; End of subprogram
; Start of subprogram
; End of subprogram
; Block end
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents