![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585108.webp)
All BASIC commands
Section 4-2
96
4-2-26 AND
/i
4-2-27 AOUT
/i
Type
Mathematical operation
Syntax
expression1 AND expression2
Description
The
AND
operator performs the logical
AND
function on the corre-
sponding bits of the integer parts of two valid BASIC expressions.
The logical
AND
function between two bits is defined as follows:
0 AND 0 = 0
0 AND 1 = 0
1 AND 0 = 0
1 AND 1 = 1
Arguments
•
expression1
Any valid BASIC expression.
•
expression2
Any valid BASIC expression.
Example
VR(0) = 10 AND (2.1*9)
The parentheses are evaluated first, but only the integer part of the
result, 18, is used for the
AND
operation. Therefore, this expression is
equivalent to the following:
VR(0) = 10 AND 18
The
AND
is a bit operator and so the binary action is as follows:
01010 AND 10010 = 00010
Therefore,
VR(0)
will contain the value 2.
Example
IF MPOS AXIS(0) > 0 AND MPOS AXIS(1) > 0 THEN GOTO cycle1
If measured positions
MPOS
of both axis 1 and axis 2 are greater than
zero, program execution continues at label
cycle1
. Otherwise, program
execution continues with the next statement.
See also
N/A
Type
I/O command
Syntax
AOUT(analogue_chan)
Description
The
AOUT
reads a value from the
AOUT
array. The CJ1W-MCH72
does not provide any analogue output. The contents of the
AOUT
array
may be mapped to PLC memory to transfer values to e.g. PLC ana-
logue output units.
Arguments
•
analogue_chan
.
Analogue output channel number 0.31
Example
No example.
See also
N/A
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...