Omron SCARA YRCX Series User Manual page 54

Hide thumbs Also See for SCARA YRCX Series:
Table of Contents

Advertisement

Sample program
Tracking operation main program
Program name: TRK_MAIN
ON ERROR GOTO *ERROR_CHECK1
CCOND ON(1) ................................................................. Validate Counter 1
MOVE P, P13, Z=0.0 ......................................................... Perform arch motion movement to waiting position
START <WORK_INSERT>,T2 .............................................. Start the workpiece detection task
*CONVEYOR: ................................................................... Label definition
WHILE CCHKQUE(1) = -1 ................................................. Repeat until there is no workpiece that has passed the
CRMVQUE(1) .............................................................. Delete the first workpiece (first queue element) that passed
WEND
IF CCHKQUE(1) = 1 THEN ................................................. Start work when first workpiece enters the working area
CTMOVE(1),Z=0.0{10.0,20.0}, CTZ=50.0,CONT ........... Start follow-up movement by arch motion and follow-up
CTDRIVE(120.0) , S=50 ............................................... Move to the workpiece height with decelerating from
DELAY 200 ................................................................. Wait 200 ms
DO(20) = 1 ................................................................. Pick up workpiece
MOVE P , P14 , Z=0.0 ................................................. Perform arch motion movement to the place point
CRMVQUE(1) .............................................................. Delete the first workpiece (first queue element) that moved
DO(20) = 0 ................................................................. Release the workpiece
ENDIF
GOTO *CONVEYOR ......................................................... Jump to label *CONVEYOR (go to tracking of next workpiece)
7
*ERROR_CHECK: .............................................................. Label definition (error avoidance)
IF ERR = &H0002015B THEN *NEXT1 ................................ If the alarm (code 2.347: Not tracking status) occurs
IF ERR = &H000C00CE THEN *NEXT1 ................................ If the alarm (code 12.206: Tracking queue element doesn't
IF ERR = &H0002015C THEN *NEXT2 ................................ If the alarm (code 2.348: Over tracking area) occurs
IF ERR = &H000C00CF THEN *NEXT3 ................................ If the alarm (code 12.207: Tracking queue element being
ON ERROR GOTO 0 ......................................................... Display error and stop execution except for alarms above
*NEXT1: ........................................................................... Label definition (error avoidance)
RESUME NEXT .................................................................. Jump to the line next to the line where error occurred, and
*NEXT2: ........................................................................... Label definition (process for picking failure)
CRMVQUE(1) ................................................................... Delete the first workpiece (first queue element) that passed
MOVE P, P13, Z=0.0 ......................................................... Perform arch motion movement to waiting position
RESUME *CONVEYOR ...................................................... Jump to label *CONVEYOR and continue execution
*NEXT3: ........................................................................... Label definition (error avoidance 3)
CTSTOP............................................................................ Stop the follow-up status
CRMVQUE(1) ................................................................... Delete the data that the follow-up status ends
RESUME NEXT .................................................................. Jump to the line next to the line where error occurred, and
(Continued on next page)
50
working area (the first queue element failed to be picked up)
the working area during follow-up from the position
monitoring queue
height setting for the first workpiece
CTMOVE operation
from the position monitoring queue
(Process continues in the following errors)
exist) occurs
used) occurs
continue execution
the working area during follow-up from the position
monitoring queue
continue execution

Advertisement

Table of Contents
loading

Table of Contents