1、01/2006,1,interrupt_resume_en.ppt,BRAKE,BRAKE F,Brakes and stops the robot motion,Brakes and stops the robot motion with max. values,DEF INT4 ( ) . BRAKE F$OUT.END,BRAKE指令使机器人停止运动。但 一旦中断程序结束,运动就会恢复。,BRAKE 指令只能在中断程序中执行,中断 BRAKE 指令,01/2006,2,interrupt_resume_en.ppt,RESUME,取消在本中断程序的优先级之下的中断程序和子程序。可能导致机
2、器人的运动被终止。,RESUME 指令只能在中断程序中执行,当 RESUME 生效时,advance run 指针不能在产生中断的行,而是至少低一行。,中断取消中断,01/2006,3,interrupt_resume_en.ppt,取消中断的前提,为了能够取消一个运动,下列条件必须先得到满足 在中断程序中使用“Brake / Resume”运动必须比中断声明至少低一个优先级advance run指针不能与中断声明在同一优先级,01/2006,4,interrupt_resume_en.ppt,DEF Prog1 ( ) INI . INTERRUPT DECL 21 WHEN $IN1 DO
3、 Found ( ) . PTP HOME . SEARCH ( ) $ADVANCE=3 . END,Example:,DEF Search ( ) INTERRUPT ON 21 LIN Strtpt LIN Endpt $ADVANCE = 0 . END; of search,DEF Found ( ) INTERRUPT OFF 21 BRAKE LIN $POS_INT ;pick up part . RESUME; cancel END,RESUME immediately cancels both subprograms and jumps to the main program,Interrupt Example: Canceling interrupt routines,01/2006,5,interrupt_resume_en.ppt,Practical exercise,Interrupt handling Canceling a motion,