Any automated system is crippled when it requires human intervention.
One of our goals then as programmers should be to eliminate as much
human intervention as possible. I’ve found that simply changing many
check conditions to short WAIT
statements results in fewer alarms and
therefore less operator intervention and more productivity.
Take for example a simple macro to ensure your gripper has correctly gripped your part:
! ENSURE_GRIP.LS ;
! ============= ;
LBL[1] ;
IF (RI[1:Grip overtravel]=OFF AND RI[2:Grip open]=OFF),JMP LBL[999] ;
;
! not gripped ;
UALM[1] ;
JMP LBL[1] ;
;
LBL[999] ;
If those signals aren’t perfect at the exact moment you call the program, you’re going to get a fault. You throw an alarm and call the operator over to potentially find the issue has resolved itself. The frustrated operator hits resume and gets back to work while the robot does the same.
This might have been prevented by using a short WAIT
statement instead
of an IF
. Maybe the sensor was a little slow to update; maybe we had a
small dip in pressure that caused us to lose our signal momentarily. If
we simply add a little bit of leniency to this check, the system ends up
being more robust:
! ENSURE_GRIP.LS ;
! ============= ;
! set wait to 100 hundredths of a second, 1 second ;
$WAITTMOUT=(100) ;
LBL[1] ;
WAIT (RI[1:Grip overtravel]=OFF AND RI[2:Grip open]=OFF) TIMEOUT,LBL[500]
JMP LBL[999] ;
;
LBL[500] ;
! not gripped ;
UALM[1] ;
JMP LBL[1] ;
;
LBL[999] ;
I’m not sure why FANUC decided to set $WAITTMOUT
in hundredths, but
that’s what it is. I usually write a quick macro to set this value in
seconds:
! SET_WAIT.LS ;
! =========== ;
! AR[1] is in seconds ;
$WAITTMOUT=(AR[1]*100) ;
Depending on what you’re checking, it may be best to keep the robot running after notifying the operator, clearing the alarm automatically if the condition resolves itself.
! TEND_MACHINE_1.LS ;
! ================= ;
! wait for up to 30 seconds ;
CALL SET_WAIT(30) ;
;
LBL[1] ;
WAIT DI[1:Machine 1 ready]=ON TIMEOUT,LBL[500] ;
F[1:Alarm]=(OFF) ;
;
! tend machine.... ;
JMP LBL[999] ;
;
LBL[500] ;
! Machine not ready ;
! Display HMI screen ;
! Turn on alarm buzzer, light, etc. ;
F[1:Alarm]=(ON) ;
! see if condition resolves itself ;
JMP LBL[1] ;
;
LBL[999:END] ;
In this case the robot never stops running. If the machine is not ready within 30 seconds we turn on the alarm to notify the operator. The robot keeps monitoring the condition and can potentially continue and turn off the alarm if the machine comes up. It may not be a good idea to do this for things like part-presence checking and gripper macros, but it’s great when other machines are frequently stalling your system.