Mechatrolink - Omron TJ2-MC64 - PROGRAMMING Programming Manual

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

BASIC commands
Example
HALT
NEW ALL
STORE
This creates the memory of the controller.
See also
DEL, NEW.
3.2.27 AND
/i
Type
Mathematical operation
Syntax
expression1 AND expression2
Description
The AND operator performs the logical AND function on the corresponding
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
PROGRAMMING MANUAL
3.2.28 AOUT
/i
Type
I/O command
Syntax
AOUT(analogue_chan)
Description
The AOUT command sets the output value of the analogue output channels
that are provided by connecting GRT1-ML2 Slice Coupler or JEPMC-AN2910
modules on the MECHATROLINK-II bus. The range of the value set is [-
32000, 32000] for full output range. The output range depends on the ana-
logue unit used and can be one of the following: [-10V, 10V], [0V, 10V] or [0V,
5V] for voltage and [0mA, 20mA] or [4mA, 20mA] for current output.
Arguments
analogue_chan.
Analogue output channel number 0.31
Example
No example.
See also
N/A
3.2.29 ASIN
/i
Type
Mathematical function
Syntax
ASIN(expression)
Description
The ASIN function returns the arc-sine of the argument. The argument must
have a value between -1 and 1. The result in radians is between -PI/2 and PI/
2. Input values outside this range return 0.
Arguments
expression
Any valid BASIC expression.
Example
>> PRINT ASIN(-1)
-1.5708
See also
N/A
37

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents