BASIC commands
PROGRAMMING MANUAL 159
Revision 1.0
3.2.219 OPEN_WIN
/i
3.2.220 OR
/i
/i
/i
Example OP(18*256)
This line sets the bit pattern 10010 on the first 5 physical outputs, outputs 13
to 17 would be cleared. The bit pattern is shifted 8 bits by multiplying by 256
to set the first available outputs as outputs 0 to 7 do not exist.
Example VR(0) = OP
VR(0) = VR(0) AND 65280
OP(VR(0))
This routine sets outputs 8 to 15 ON and all others off.
The above programming can also be written as follows:
OP(OP AND 65280)
Example val = 8 ' The value to set
mask = OP AND NOT(15*256) ' Get current status and mask
OP(mask OR val*256) ' Set val to OP(8) to OP(11)
This routine sets value val to outputs 8 to 11 without affecting the other out-
puts by using masking.
See also IN.
Type Axis parameter
Syntax OPEN_WIN
OW
Description The OPEN_WIN parameter defines the beginning of the window inside or
outside which a registration event is expected. The value is in user units.
Arguments N/A
Example only look for registration marks between 170 and 230
OPEN_WIN = 170
CLOSE_WIN = 230
REGIST(256+3)
WAIT UNTIL MARK
See also CLOSE_WIN, REGIST, UNITS.
Type Mathematical operation
Syntax expression1 OR expression2
Description The OR operator performs the logical OR function between corresponding
bits of the integer parts of two valid BASIC expressions.
The logical OR function between two bits is defined as in the table below.
Bit 1 Bit 2 Result
000
011
101
111
Arguments • expression1
Any valid BASIC expression.
• expression2
Any valid BASIC expression.
Example result = 10 OR (2.1*9)
The parentheses are evaluated first, but only the integer part of the result, 18,
is used for the operation. Therefore, this expression is equivalent to the fol-
lowing:
result = 10 OR 18
The OR is a bit operator and so the binary action taking place is:
01010 OR 10010 = 11010
Therefore, result will contain the value 26.
Example IF KEY OR VR(0) = 2 THEN GOTO label
See also N/A