EasyManua.ls Logo

Omron trajexia CJ1W-MCH72 - Page 107

Omron trajexia CJ1W-MCH72
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Related product manuals