Rockwell-automation Logix5000 Controllers Structured Text Programming Bedienungsanleitung Seite 29

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 40
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 28
Publication 1756-PM007D-EN-P - November 2012 29
Program Structured Text Chapter 1
Description: The syntax is:
These diagrams show how a FOR...DO loop executes and how an EXIT
statement leaves the loop early.
Arithmetic Status Flags: Not affected
Fault Conditions:
FOR count := initial_value
TO final_value
Optional {
BY increment
If you don’t specify an increment, the loop
increments by 1.
DO
<statement>;
Optional
IF bool_expression THEN
EXIT;
If there are conditions when you want to
exit the loop early, use other statements,
such as an IF...THEN construct, to
condition an EXIT statement.
END_IF;
END_FOR;
statement 1
statement 2
statement 3
Done x number
of times?
No
Yes
Rest of the routine
statement 1
statement 2
statement 3
Done x number
of times?
no
Yes
Rest of the routine
Yes
No
The FOR…DO loop executes a specific
number of times.
To stop the loop before the count reaches the last
value, use an EXIT statement.
A major fault will occur if Fault type Fault code
The construct loops too long 6 1
Seitenansicht 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 39 40

Kommentare zu diesen Handbüchern

Keine Kommentare