EasyManuals Logo

Siemens SINUMERIK 810D Programming Guide

Siemens SINUMERIK 810D
598 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 #100 background imageLoading...
Page #100 background image
2
Subprograms, Macros 12.98
2.4 Callin
g
sub
p
ro
g
rams
2
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
2-100
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
Subprogram call with parameter transfer
In the main program you call the subprogram by
specifying the program name and parameter
transfer. When transferring parameters you can
transfer variables or values directly (not for VAR
parameters).
Example:
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)
Subprogram definition must match subprogram
call
Main program
N30 LENGTH=15.3 WIDTH=20.2 DEPTH=5
N40 BORDER(LENGTH,WIDTH;DEPTH)
or
N40BORDER(15.3,20.2,5)
Both the variable types and the sequence of transfer
must match the definitions declared under PROC in
the subprogram name. The parameter names can
be different in the main program and subprograms.
Example:
Definition in the subprogram:
PROC BORDER(REAL LENGTH, REAL WIDTH, REAL DEPTH)
Call in the main program:
N30 BORDER(LENGTH, WIDTH, DEPTH)

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