All BASIC commands
Section 4-2
129
/i
/i
Example
A production line must stop if something blocks the product belt, which
causes a motion error. The obstacle must be removed, and a reset but-
ton must be pressed to restart the line.
FORWARD 'start production line
WHILE IN(2)=ON
IF MOTION_ERROR=0 THEN
OP(8,ON) 'green light on; line is in motion
ELSE
OP(8, OFF)
GOSUB error_correct
ENDIF
WEND
CANCEL
STOP
error_correct:
REPEAT
OP(10,ON)
WA(250)
OP(10,OFF) 'flash red light to show crash
WA(250)
UNTIL IN(1)=OFF
DATUM(0) 'reset axis status errors
SERVO=ON 'turn the servo back on
WDOG=ON 'turn on the watchdog
OP(9,ON) 'sound siren that line will restart
WA(1000)
OP(9,OFF)
FORWARD 'restart motion
RETURN
Example
The position of an axis must be defined by the Z marker. This position
must be set to zero. Then the axis must move to this position. Using the
datum 1 the zero point is set on the Z mark. But the axis starts to decel-
erate at this point, and therefore it stops after the mark. A move is used
to bring it back to the Z position.
SERVO=ON
WDOG=ON
CREEP=1000 'set the search speed
SPEED=5000 'set the return speed
DATUM(1) 'register on Z mark and sets this to datum
WAIT IDLE
MOVEABS (0) 'moves to datum position
Summary of Contents for SYSMAC CJ Series
Page 2: ......
Page 70: ...Specifications Section 2 4 58...
Page 84: ...FINS commands Section 3 4 72...
Page 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Page 370: ...Section 358...