Lenze PMSS1000 Simple Servo Manuel d'utilisateur Page 29

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 72
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 28
Indexer-Programmer-Manual.pdf REV 1.3
2.5 Bitwise operators
The following bitwise operators are supported
Operator Symbol
AND &
OR |
XOR ^
NOT !
Both User or System variables can be used with these operators.
Examples:
V1 = V2 & 0xF ;clear all bits but lowest 4
IF (INPUTS & 0x3) ;check inputs 0 and 1
V1 = V1 | 0xff ;set lowest 8 bits
V1 = INPUTS ^ 0xF ;invert inputs 0-3
V1 = !IN_A1 ;invert input 0
2.6 Boolean Operators
These operators are used in logical expressions.
Operator Symbol
AND &&
OR ||
NOT !
Examples:
IF APOS >2 && APOS <6 || APOS >10 && APOS <20
. {statements if true}
ENDIF
Above example check if APOS(actual position) within one of two windows:
2 to 6 units or 10 to 20 units. In plain English:
"If APOS more then 2 AND APOS less then 6 OR APOS more then 10 AND APOS
less then 20 -----à then evaluate to TRUE. Otherwise it is FALSE"
29
Vue de la page 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 71 72

Commentaires sur ces manuels

Pas de commentaire