Rockwell-automation Logix5000 Controllers Structured Text Programming Bedienungsanleitung Seite 25

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 40
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 24
Publication 1756-PM007D-EN-P - November 2012 25
Program Structured Text Chapter 1
CASE...OF
Use CASE to select what to do based on a numerical value.
Operands:
Structured Text
Description: The syntax is:
Operand Type Format Enter
numeric_
expression
SINT
INT
DINT
REAL
Tag
Expression
Tag or expression that evaluates to a
number (numeric expression)
selector
SINT
INT
DINT
REAL
Immediate Same type as
numeric_expression
IMPORTANT
If you use REAL values, use a range of values for a selector
because a REAL value is more likely to be within a range of
values than an exact match of one, specific value.
CASE numeric_expression OF
selector1: statement;
selectorN: statement;
ELSE
statement;
END_CASE;
CASE numeric_expression OF
Specify as many
alternative selector
values (paths) as you
need
selector1 : <statement>;
.
.
.
Statements to execute when
numeric_expression = selector1
selector2 : <statement>;
.
.
.
Statements to execute when
numeric_expression = selector2
selector3 : <statement>;
.
.
.
Statements to execute when
numeric_expression = selector3
Seitenansicht 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 39 40

Kommentare zu diesen Handbüchern

Keine Kommentare