Rockwell-automation 57C610 Enhanced Basic Language, AutoMax Manuel d'utilisateur Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 146
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
5Ć5
Table 5.3 Ć Truth Table for Boolean Operators
   
00 0 0 0 1
01 0 1 1 1
10 0 1 1 0
11 1 1 0 0
1= TRUE; 0 = F
ALSE
The AND boolean operator has a higher precedence than the OR or
XOR operators, which have equal precedence. Thus, in a boolean
expression, the AND operator will be evaluated before the OR
operator. The NOT operator is always applied immediately to the
expression (which is the same as the unary minus operator). The
following examples show a boolean expression and the order of
evaluation of the operators:
A@ = B@ OR C@ AND D@
1. C@ AND D@
2. B@ OR [C@ AND D@]
A@=B@ AND NOT C@ OR D@ AND A@
1. NOT C@
2. B@ AND [NOT C@]
3. D@ AND A@
4. [B@ AND (NOT C@)] OR [D@ AND A@]
A@ = NOT(A@ OR B@AND C@) OR C@ AND NOT D@ OR
B@
1. B@ AND C@
2. A@ OR [B@ AND C@]
3. NOT [A@ OR (B@ AND C@)]
4. NOT D@
5. C@ AND [NOT D@]
6. [NOT (A@ OR (B@ AND C @))] OR [C@ AND (NOT D@)]
7. [(NOT (A@ OR (B@ AND C@))) OR (C@ AND (NOT D@))] OR
B@
Boolean values can be combined with integer values by using either
boolean or arithmetic operators. In combining the two data types,
note the following guidelines:
D When a boolean value is combined with an integer value using
boolean operators or arithmetic operators, the result is always in
integer.
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 145 146

Commentaires sur ces manuels

Pas de commentaire