All BASIC commands Section 4-2
94
/i
!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.
4-2-23 ADDAX_AXIS
/i
Example An X-Y marking machine must mark boxes as they move along a con-
veyor. Using CONNECT enables the X marking axis to follow the con-
veyor. A virtual axis is used to program the marking absolute positions;
this is then superimposed onto the X axis using ADDAX.
ATYPE AXIS(3)=0 'set axis 3 as virtual axis
SERVO AXIS(3)=ON
DEFPOS(0) AXIS(3)
ADDAX (3)AXIS(0) 'connect axis 3 requirement to axis 0
WHILE IN(2)=ON
REGIST(3) 'registration input detects a box on the conveyor
WAIT UNTIL MARK OR IN(2)=OFF
IF MARK THEN
CONNECT(1,2) AXIS(0)'connect axis 0 to the moving belt
BASE(3,1) 'set the drawing motion to axis 3 and 1
'Draw the M
MOVEABS(1200,0)'move A > B
MOVEABS(600,1500)'move B > C
MOVEABS(1200,3000)' move C > D
MOVEABS(0,0)'move D > E
WAIT IDLE
BASE(0)
CANCEL 'stop axis 0 from folowing the belt
WAIT IDLE
MOVEABS(0) 'move axis 0 to home position
ENDIF
WEND
CANCEL
See also ADDAX_AXIS, AXIS, OUTLIMIT
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. If the base axis in
not linked to any other axis, the ADDAX_AXIS parameter returns -1.
Arguments N/A
Example >> BASE(0)
>> ADDAX(2)
>> PRINT ADDAX_AXIS
2.0000
>> ADDAX(-1)
>> PRINT ADDAX_AXIS
-1.0000
See also ADDAX, AXIS