Calling A Subroutine - Siemens SINUMERIK 840D sl Operation/Programming Manual

Shopturn
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

ShopTurn Functions
5

5.7 Calling a subroutine

5.7
Calling a subroutine
5-312
If you require the same machining steps in the programming of
different workpieces, you can define these machining steps in a
separate routine. You can then call this subroutine in any programs.
Identical machining steps therefore only have to be programmed
once.
ShopTurn does not differentiate between main program and
subroutine. This means that you can call a "standard" sequential
control or G code program as subroutine in another sequential control
program. In this subroutine, you can also call another subroutine. The
maximum nesting depth is 8 subroutines.
You cannot insert subroutines among blocks chained by the control.
If you want to call a sequential control program as a subroutine, the
program must already have been calculated once (load or simulate
program in Machine Auto mode). This is not necessary for G code
subroutines.
The subroutine must always be stored in the NCK main memory (in a
separate directory "XYZ" or in the "ShopTurn", "Part programs", and
"Subroutines" directories).
If you want to call a subroutine located on another drive, you can use
G code command "EXTCALL".
Example: Calling program "Form25_1.mpf" on the compact flash card
of the PCU 20:
EXTCALL "C:\FORM25_1.MPF"
Please note that ShopTurn evaluates the settings from the program
header of the subroutine, excluding the blank settings, when the
subroutine is called. These settings also remain active even after the
subroutine has ended.
If you wish to activate the settings from the program header for the
main program again, you can make the settings again in the main
program after calling the subroutine (see Sec. "Changing program
settings").
Create a ShopTurn or G code program that you would like to call
as a subroutine in another program.
Place the cursor in the machining plan of the main program on the
program block after which the subroutine call is to be inserted.
SINUMERIK 840D sl Operation/Programming ShopTurn (BAT) – 08/2005 Edition
08/2005
5
♥ Siemens AG, 2005. All rights reserved

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents