![background image](http://html1.mh-extra.com/html/omron/r88a-mcw151-drt-e/r88a-mcw151-drt-e_operation-manual_742243182.webp)
167
Command, function and parameter description
Section 6-3
OP(12,1)
OP(12,ON)
Example 2
This following 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 multiply-
ing by 256 to set the first available outputs as outputs 0 to 7 do not exist.
OP(18*256)
Example 3
This routine sets outputs 8 to 15 ON and all others OFF.
VR(0) = OP
VR(0) = VR(0) AND 65280
OP(VR(0))
The above programming can also be written as follows:
OP(OP AND 65280)
Example 4
This routine sets value val to outputs 8 to 11 without affecting the other out-
puts by using masking.
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)
6-3-133 OPEN_WIN
Type:
Axis Parameter
Alternative:
OW
Description:
The OPEN_WIN parameter defines the beginning of the window inside or out-
side which a registration event is expected. The value is in user units.
See also:
CLOSE_WIN, REGIST, UNITS
6-3-134 OR
Type:
Logical Operator
Syntax:
expression_1
OR
expression_2
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 follows:
Arguments:
expression_1
Any valid BASIC expression.
expression_2
Any valid BASIC expression.
Examples:
Example 1
result = 10 OR (2.1*9)
15 14 13 12 11 10 9
8
7
6
5
4
3
2
1
0
val
Bit 1
Bit 2
Result
0
0
0
0
1
1
1
0
1
1
1
1