Jump Destination For Program Jumps; Subroutine Technique; General Information - Siemens sinumerik 808d Programming And Operating Manual

Hide thumbs Also See for sinumerik 808d:
Table of Contents

Advertisement

Programming principles

1.11 Subroutine technique

1.10.4

Jump destination for program jumps

Functionality
A label or a block number serve to mark blocks as jump destinations for program jumps.
Program jumps can be used to branch to the program sequence.
Labels can be freely selected, but must contain a minimum of 2 and a maximum of 8 letters
or numbers of which the first two characters must be letters or underscore characters.
Labels that are in the block that serves as the jump destination are ended by a colon. They
are always at the start of a block. If a block number is also present, the label is located after
the block number.
Labels must be unique within a program.
Programming example
N10 LABEL1: G1 X20
N20 G0 X10 Z10
TR789: G0 X10 Z20
G0 X30 Z30
N100 G0 X40 Z40
M30
1.11
Subroutine technique
1.11.1

General information

Usage
Basically, there is no difference between a main program and a subroutine.
Frequently recurring machining sequences are stored in subroutines, e.g certain contour
shapes. These subroutines are called at the appropriate locations in the main program and
then executed.
One form of a subroutine is the machining cycle. Machining cycles contain universally valid
machining scenarios. By assigning values via included transfer parameters, you can adapt
the subroutine to your specific application.
Layout
The structure of a subroutine is identical to that of a main program (see Section "Program
structure (Page 7)"). Like main programs, subroutines contain M2 - end of program in the
last block of the program sequence. This means a return to the program level where the
subroutine was called from.
94
;LABEL1 is the label, jump destination
;TR789 is the label, jump destination
- No block number existing
;Block number can be jump target
Turning Part 2: Programming (Siemens instructions)
Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0

Advertisement

Table of Contents
loading

Table of Contents