EasyManuals Logo

Siemens MCP 398C Programming Manual

Siemens MCP 398C
1334 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 #477 background imageLoading...
Page #477 background image
Meaning
IF: Introduces the conditional statement or branch.
ELSE: Introduces the alternative program block.
ENDIF: Marks the end of the conditional statement or branch.
<condition>: Logical expression that is evaluated as TRUE or FALSE.
Example: Tool change subprogram
Program code Comment
PROC L6 Tool change routine
N500 DEF INT TNR_AKTUELL Variable for active T number
N510 DEF INT TNR_VORWAHL Variable for preselected T number
Determine current tool
N520 STOPRE
N530 IF $P_ISTEST In the program test mode ...
N540 TNR_AKTUELL = $P_TOOLNO ... the "current" tool is read
from the program context.
N550 ELSE Otherwise ...
N560 TNR_AKTUELL = $TC_MPP6[9998,1] ... the tool of the spindle is
read-out.
N570 ENDIF
N580 GETSELT(TNR_VORWAHL) Read the T number of the pre-se-
lected tool in the spindle.
N590 IF TNR_AKTUELL <> TNR_VORWAHL If the pre-selected tool is
still not the current tool,
then ...
N600 G0 G40 G60 G90 SUPA X450 Y300 Z300 D0 ... Approach tool change posi-
tion ...
N610 M206 ... and perform a tool change.
N620 ENDIF
N630 M17
3.1.7.2 Continuous program loop (LOOP, ENDLOOP)
Endless loops are used in endless programs. At the end of the loop, there is always a branch
back to the beginning.
Syntax
LOOP
...
ENDLOOP
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 477

Table of Contents

Other manuals for Siemens MCP 398C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens MCP 398C and is the answer not in the manual?

Siemens MCP 398C Specifications

General IconGeneral
BrandSiemens
ModelMCP 398C
CategoryControl Systems
LanguageEnglish

Related product manuals