Lenze DDS v2.3 Manuale Utente Pagina 48

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 340
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 47
Drive PLC Developer Studio
Programming languages
4-10
l
DDS EN 2.3
4.3.11 REPEAT loop
The REPEAT loop differs from the WHILE loop in that the cancel condition will only be checked after
the loop has been carried out. This means that the loop must be executed at least once no matter
what the cancel condition is.
Syntax:
REPEAT
<instructions>
UNTIL <Boolean expression>
END_REPEAT;
The <instructions> are executed until <Boolean expression> returns TRUE.
If <Boolean expression> returns TRUE on first evaluation already, the
<instructions> will be executed exactly once.
If <Boolean_expression> is never TRUE, the <instructions> will be repeated
endlessly, forcing a runtime error.
Example:
REPEAT
Var1:=Var1*2;
Counter:=Counter-1;
UNTIL
Counter=0
END_REPEAT;
4.3.12 EXIT instruction
If the EXIT instruction is part of a FOR-, WHILE or REPEAT loop, the loop will be terminated
irrespective of the cancel condition.
In nested loops, EXIT terminates the innermost loop.
Show/Hide Bookmarks
Vedere la pagina 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 339 340

Commenti su questo manuale

Nessun commento