Rockwell-automation 8520-GUM 9/Series CNC Grinder Operation and Progra Manual de usuario Pagina 655

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 820
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 654
Paramacros
Chapter 20
20-11
All blocks between the DO and the END command are executed
indefinitely or until execution is transferred to some block out of the loop
or stopped by some external operation such as pressing <CYCLE STOP>
or
<E-STOP>.
Conditional WHILE-DO -END
The conditional WHILE-DO-END command is dependent on whether a
mathematical condition is true. If this condition is false, execution
transfers to the block immediat ely following the END statement block.
The format for the WHILE-DO-END command is:
WHILE [ (condition) ] DO m;
;
;
;
END m;
Where: Is :
(condition) somecondition expression (seepage 20-7fordetails). This conditionistested
bythecontrolto determineif itis trueorfalse.
m an identifierusedby the control torelateaDO blockwith an ENDblock. The
valueofm mustbe the samefor theDO andthecorrespondingEND. This value
canbeeither1,2,or 3.
All blocks between the DO and the END command are executed until the
condition is tested as false. This set of blocks is referred to as a
WHILE-DO-END program segment.
When the condition for the WHILE-DO block is tested as false, execution
is transferred to the block immediately following the END statement block.
Example 20.9 illustrates the use of the WHILE-DO-END block.
Example 20.9
WHILE-DO-END Program Segment
N1 #1=1;
N2WHILE[#1LT10]DO1
N3#1=[#1+1];
N4...;
N5...;
N6END1;
N7...;
Vista de pagina 654
1 2 ... 650 651 652 653 654 655 656 657 658 659 660 ... 819 820

Comentarios a estos manuales

Sin comentarios