AND
Reset pins specified as 0. Logical AND.
Syntax
and [<mask> [count]]
& [<mask> [count]]
Parameters
count
- Decimal number from 2 to 100, tells how many times next command or block will be retried.
<mask>
- 1) Sequense of 0 or 1, for ex. 111000111000.
- 2) Enum of bit-numbers at bracket, for ex. (1), (2,3,4) or (8,12,5,11), its accordingly to 100000000000, 011100000000 or 000010010011. First left bit is 1 (but not zero).
Example
sleeps 500 ; Set sleeps = 500 ms
CYCLE: ; Define Label
on ; Set all outputs to HIGH state
and 011111111111 ; Switch output 1 to LOW state
and 110111111111 ; Switch output 3 to LOW state
and 111101111111 ; Switch output 5 to LOW state
& 111111011111 ; Switch output 7 to LOW state
& 111111110111 ; Switch output 9 to LOW state
& 111111111101 ; Switch output 11 to LOW state
111111111111 ; Set all outputs to HIGH state
&(1,4,7,10) ; Reset all outputs LOW state
; except outputs 1, 4, 7 and 10
; Equivalent to & 011011011011
goto CYCLE ; Infinite cycles