Lenze PMSS1000 Simple Servo Instrukcja Użytkownika Strona 29

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 72
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 71 72

Komentarze do niniejszej Instrukcji

Brak uwag