Omron TJ1-MC04 - PROGRAMMING 1 Programming Manual page 282

Hide thumbs Also See for TJ1-MC04 - PROGRAMMING 1:
Table of Contents

Advertisement

Examples and tips
reset_all:
WHILE MOTION_ERROR<>0
'Wait for rising edge in RESET input
WAIT UNTIL READ_BIT(2,0)=0
WAIT UNTIL READ_BIT(2,0)=1
action=2
'Reset faulty servos
FOR i=0 TO max_axis
BASE(i)
'In case of ML-II error the reset is:
IF (AXISSTATUS AND 4)<>0 THEN
MECHATROLINK(0,0)
WA(3000)
DATUM(0)
RUN "startup",1
STOP
ENDIF
'In case of Servo Driver error
IF (AXISSTATUS AND 8)<>0 THEN DRIVE_CLEAR
NEXT i
WA(100)
'In case of axis error
DATUM(0)
WEND
project_status=1 'Stopped but no error
alarm_status=5
action=3
RETURN
start_application:
'Wait for rising edge in bit 0 of VR(0)
WHILE READ_BIT(0,0)=0
IF MOTION_ERROR<>0 THEN RETURN
WEND
WHILE READ_BIT(0,0)=1
IF MOTION_ERROR<>0 THEN RETURN
WEND
RUN "APPLICATION"
project_status=3 'Application running
RETURN
PROGRAMMING MANUAL
282

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-mc16 - programming 1Tj1-mc04 1

Table of Contents