Omron trajexia CJ1W-MCH72 Operation Manual page 148

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
/i
Example
Two conveyors operated by the same Motion Coordinator are required
to run independently, to make sure that the second conveyor does not
stop if the first conveyor is blocked.
DISABLE_GROUP(0) 'put axis 0 in its own group
DISABLE_GROUP(1) 'put axis 1 in another group
GOSUB group_enable0
GOSUB group_enable1
WDOG=ON
FORWARD AXIS(0)
FORWARD AXIS(1)
WHILE TRUE
IF AXIS_ENABLE AXIS(0)=0 THEN
PRINT "motion error axis 0"
reset_0_flag=1
ENDIF
IF AXIS_ENABLE AXIS(1)=0 THEN
PRINT "motion error axis 1"
reset_1_flag=1
ENDIF
IF reset_0_flag=1 AND IN(0)=ON THEN
GOSUB group_enable0
FORWARD AXIS(0)
reset_0_flag=0
ENDIF
IF reset_1_flag=1 AND IN(1)=ON THEN
GOSUB group_enable1
FORWARD AXIS(1)
reset_1_flag=0
ENDIF
WEND
group_enable0:
BASE(0)
DATUM(0) ' clear motion error on axis 0
WA(10)
AXIS_ENABLE=ON
RETURN
group_enable1:
BASE(1)
DATUM(0) ' clear motion error on axis 0
WA(10)
AXIS_ENABLE=ON
SERVO=ON
RETURN
Section 4-2
137

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents