Rockwell-automation Logix5000 Controllers Structured Text Programming Manuel d'utilisateur Page 25

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 40
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 39 40

Commentaires sur ces manuels

Pas de commentaire