EasyManuals Logo

Siemens SINUMERIK 810D Programming Manual

Siemens SINUMERIK 810D
687 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #95 background imageLoading...
Page #95 background image
Subroutines, Macros
2.4 Call subroutines (L or EXTERN)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
2-11
Example: Subroutine call with parameter transfer
N10 DEF REAL LENGTH,WIDTH,DEPTH
N20…
N30 LENGTH=15.3 WIDTH=20.2 DEPTH=5
N40 BORDER(LENGTH,WIDTH,DEPTH)
or
N40 BORDER(15.3,20.2,5)
1%25'(5
1%25'(5/(1*7+:,'7+'(37+
1/(1*7+ :,'7+ '(37+ 
RU
0DLQSURJUDP
Example: subroutine
PROC SUB1 (INT VAR1, DOUBLE VAR2)
IF $P_SUBPAR[1]==TRUE
;Parameter VAR1 was programmed in the subroutine call
ELSE
;Parameter VAR1 was not programmed in the subroutine call
;and initialized by the system with the default value 0
ENDIF
IF $P_SUBPAR[2]==TRUE
;Parameter VAR2 was programmed in the subroutine call
ELSE
;Parameter VAR2 was not programmed in the subroutine call
;programmed and initialized by the system with the default value 0.0
ENDIF
;Parameter 3 is not defined
IF $P_SUBPAR[3]==TRUE -> Alarm 17020
M17

Table of Contents

Other manuals for Siemens SINUMERIK 810D

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK 810D and is the answer not in the manual?

Siemens SINUMERIK 810D Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK 810D
CategoryControl Unit
LanguageEnglish

Related product manuals