Siemens SINUMERIK 840DE sl Commissioning Manual page 1146

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Programming commands
6.3 Functions
Parameter:
Example
//M(TestGC/"Code generation:")
DEF VAR1 = (R//1)
DEF VAR2 = (R//2)
DEF D_NAME
LOAD
VAR1 = 123
VAR2 = -6
END_LOAD
OUTPUT(CODE1)
"Cycle123(" VAR1 "," VAR2 ")"
"M30"
END_OUTPUT
PRESS(VS1)
D_NAME = "\MPF.DIR\MESSEN.MPF"
GC("CODE1",D_NAME)
END_PRESS
Storing the target file
The GC function can only be used within the NC. Use the function CP or MP to move the file.
See the following examples:
160
Identifier
Name of the OUTPUT method from which code is generated
Target file
Path name of target file for HMI or NC file system
If the target file is not specified (only possible within Program‐
ming Support), the code will be written to the location of the
cursor within the file that is currently open.
Opt
Option for generating comments.
0: (Default setting) Generate code with comment for the purpose
of recompilability (see also Recompile (Page 176)).
1: Do not create comments in the generated code.
Note: This code cannot be recompiled (see also Recompile
(Page 176)).
Append
This parameter is only relevant if a target file is specified.
0: (Default setting) If the file already exists, the old content is
deleted.
1: If the file already exists, the new code is written at the start of
the file.
2: If the file already exists, the new code is written at the end of
the file.
; Write NC code from the OUTPUT method to file
\MPF.DIR\MESSEN.MPF:
Cycle123(123, -6)
M30
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents