Siemens SINUMERIK 840D sl Commissioning Manual page 708

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

Advertisement

Programming commands
6.3 Functions
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.2
Subprogram call (CALL)
Description
The CALL function can be used to call a loaded subprogram from any point in a method.
Subprogram nesting is supported, i.e., you can call a subprogram from another subprogram.
Programming
Syntax:
Description:
Parameters:
Example
//M(SCREEN FORM1)

VAR1 = ...
VAR2 = ...
LOAD
...
LB("PROG1")
...
END_LOAD
90
VAR1.val="Hans"
RETURN
("Identifier")
CALL
Subroutine call
Identifier
; Block start
; Start of subprogram
; Assign value 5 to register 0

; End of subprogram
; Start of subprogram
; End of subprogram
; Block end
Name of subprogram
; Load block
Programming Manual, 03/2013, 6FC5397-1DP40-3BA1
SINUMERIK Integrate Run MyScreens (BE2)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents