BASIC commands
PROGRAMMING MANUAL
47
Revi
si
on 3.0
3.2.23 ADDAX_AXIS
/i
3.2.24 AIN
/i
3.2.25 AND
/i
Example
FORWARD ' Set continuous move
ADDAX(2) ' Add axis 2 for correction
REPEAT
GOSUB getoffset ' Get offset to apply
MOVE(offset) AXIS(2)
UNTIL IN(2) = ON ' Until correction is done
Pieces are placed onto a continuously moving belt and further along the line
are picked up. A detection system gives an indication as to whether a piece is
in front of or behind its nominal position, and how far.
In this example, axis 0 is assumed to be the base axis and it executes a con-
tinuous forward movement and a superimposed move on axis 2 is used to
apply offsets according to the offset calculated in a subroutine.
See also
AXIS
,
OUTLIMIT
WARNING
Beware that giving several
ADDAX
commands in a system can
create a dangerous loop when for instance one axis is linked to
another and vice versa. This may cause instability in the system.
Type
Axis parameter (read-only)
Syntax
ADDAX_AXIS
Description
The
ADDAX_AXIS
axis parameter returns the number of the axis to which
the base axis is currently linked to by
ADDAX
.
Arguments
N/A
Example
>> BASE(0)
>> ADDAX(2)
>> PRINT ADDAX_AXIS
2.0000
See also
ADDAX
,
AXIS
Type
System parameter
Syntax
AIN(analogue_chan)
Description
+/-10V analogue input channels are provided by connecting JEPMC-AN2900
modules on the MECHATROLINK-II bus.
Note: The analogue input value is checked to ensure it is above zero even
though it always should be positive. This is to allow for any noise on the
incoming signal which could make the value negative and cause an error
because a negative speed is not valid for any move type except
FORWARD
or
REVERSE
.
Arguments
analogue_chan
.
Analogue input channel number 0.31
Example
MOVE(-5000)
REPEAT
a=AIN(1)
IF a<0 THEN a=0
SPEED=a*0.25
UNTIL MTYPE=0
The speed of a production line is governed by the rate at which material is fed
onto it. The material feed is via a lazy loop arrangement which is fitted with an
ultra-sonic height sensing device. The output of the ultra-sonic sensor is in
the range 0V to 4V where the output is at 4V when the loop is at its longest.
See also
N/A
Type
Mathematical operation
Syntax
expression1 AND expression2
I52E-EN-03.book Seite 47 Freitag, 29. Juni 2007 11:55 11