EasyManuals Logo
Home>Siemens>Control Systems>SINUMERIK ONE MCP 2400.4c

Siemens SINUMERIK ONE MCP 2400.4c Programming Manual

Siemens SINUMERIK ONE MCP 2400.4c
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 #479 background imageLoading...
Page #479 background image
Examples
Example 1: INTEGER variable or R parameter as count variable
INTEGER variable as count variable:
Program code Comment
DEF INT iVARIABLE1
R10=R12-R20*R1 R11=6
FOR iVARIABLE1 = R10 TO R11 ; Count variable = INTEGER variable
R20=R21*R22+R33
ENDFOR
M30
R parameter as count variable:
Program code Comment
R11=6
FOR R10=R12-R20*R1 TO R11 ; Count variable = R parameter (real variable)
R20=R21*R22+R33
ENDFOR
M30
Example 2: Production of a fixed quantity of parts
Program code Comment
DEF INT WKPCCOUNT ; Defines type INT variable with the name
"WKPCCOUNT".
FOR WKPCCOUNT = 0 TO 100 ; Initiates the count loop. The "WKPCCOUNT" vari-
able increments from the initial value "0" to the
end value "100".
G01 …
ENDFOR ; End of count loop
M30
3.1.7.4 Program loop with condition at start of loop (WHILE, ENDWHILE)
For a WHILE loop, the condition is at the beginning of the loop. The WHILE loop is executed as
long as the condition is fulfilled.
Syntax
WHILE <condition>
...
ENDWHILE
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 479

Table of Contents

Other manuals for Siemens SINUMERIK ONE MCP 2400.4c

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK ONE MCP 2400.4c and is the answer not in the manual?

Siemens SINUMERIK ONE MCP 2400.4c Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK ONE MCP 2400.4c
CategoryControl Systems
LanguageEnglish

Related product manuals