EasyManuals Logo

Siemens SINUMERIK 840D Programming Guide

Siemens SINUMERIK 840D
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 #98 background imageLoading...
Page #98 background image
2
Subprograms, Macros 12.98
2.3 Sub
p
ro
g
rams with
p
arameter transfer
2
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
2-98
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
Array definition
The following applies to the definition of the formal
parameters:
With two-dimensional arrays the number of fields in
the first dimension does not need to be specified, but
the comma must be written.
Example:
VAR REAL ARRAY[,5]
With certain array dimensions it is possible to process
subprograms with arrays of variable length. However,
when defining the variables you must define how many
elements it is to contain.
See the Programming Guide "Advanced" for an
explanation of array definition.
Programming example
Programming with variable array dimensions
%_N_DRILLING_PLATE_MPF
Main program
DEF REAL TABLE[100,2]
Define position table
EXTERN DRILLING_PATTERN
(VAR REAL[,2],INT)
TABLE[0.0]=-17.5
Define positions
…
TABLE[99.1]=45
DRILLING_PATTERN(TABLE,100)
Subprogram call
M30
Creating a drilling pattern using the position table of variable dimension passed
%_N_DRILLING_PATTERN_SPF
Subprogram
PROC DRILLING_PATTERN(VAR REAL
ARRAY[,2],->
-> INT NUMBER)
Parameters passed
DEF INT COUNT
STEP: G1 X=ARRAY[COUNT,0]->
-> Y=ARRAY[COUNT,1] F100
Machining sequence
Z=IC(-5)
Z=IC(5)
COUNT=COUNT+1
IF COUNT<NUMBER GOTOB STEP
RET
End of subprogram

Table of Contents

Other manuals for Siemens SINUMERIK 840D

Questions and Answers:

Question and Answer IconNeed help?

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

Siemens SINUMERIK 840D Specifications

General IconGeneral
SeriesSINUMERIK 840D
AxesUp to 31
ChannelsUp to 10
Operating SystemWindows-based
Power Supply24 V DC
Control Unit TypeCNC
InterfaceEthernet, PROFIBUS
DisplayTFT color display
InterpolationSpline
PLCIntegrated PLC
Data StorageCompactFlash, USB

Related product manuals