当前位置:网站首页>How to use interrupt
How to use interrupt
2022-06-29 17:10:00 【User 4442670】
Hi Hello everyone , Everybody knows kuka Robot programs are executed sequentially , So how to realize the continuous monitoring of a certain signal . Or after a signal is triggered , The robot immediately stops the current task to perform another task .
This is what we want to say in this issue INTERRUPT Instructions .
Nonsense
The first is the break statement ;
<GLOBAL> INTERRUPT DECL Prio WHEN Ereignis DO Interruptprogramm
<GLOBAL>: Indicates a global interrupt
Notice the break statement ,INTERRUPT DECL
Prio: Interrupt number , It is also a priority , priority 1、2、4 - 39 and 81 - 128 To choose from . priority 3 and 40 - 80 It is reserved for system application
WHEN Ereignis : Interrupt trigger condition
DO Interruptprogramm: The program called after the condition is met
give an example :
INTERRUPT DECL 10 WHEN $IN[10] DO STOP_PROG( )
It should be noted that GLOBAL The concept of :
The following figure shows the pictures in the official data , This picture is a good illustration of GLOBAL Usage of .
That is, to declare an interrupt on a subroutine , add GLOBAL Then the upper layer program is also effective .
The next step is to enable interrupts
INTERRUPT ON/OFF/DISABLE/ENABLE < Number >
ON: Enable interrupt
OFF: Stop enabling
DISABLE: prohibit / Pause
ENABLE: Open a forbidden interrupt
ON/OFF These two don't say ,DISABLE/ENABLE These two are used to pause the interrupt that has been enabled .
And in DISABLE Still check the trigger condition after , But run to ENABLE Then the interrupt program will be executed .
DISABLE/ENABLE This general application is shown in the figure below ,
Program start interrupt ON Before the robot enters the machine tool DISABLE, The robot comes out of the machine tool ENABLE, In this way, whenever an interrupt triggers , The robot will not stop inside the machine tool , Ensure the safety of the equipment .
Interrupt the program
An interrupt can trigger a program to execute the operation after the interrupt
for example STOP_PROG( ) Such a name
Some syntax of interrupt program is different from that of ordinary program module
Not usable :
You cannot use online forms ,
Do not use tape s For example sptp,slin
Not available Advance
Not available INI
permissible :
Brake(F)
Resume
give an example :
GLOBAL INTERRUPT DECL 100 WHEN e_stop==FALSE DO robot_stop( )
INI
PTP HOME Vel= 100 % DEFAULT
INTERRUPT ON 100 ; The number is after , If you don't write it, it means all Interrupt All set ON
LOOP
…
…
ENDLOOP
INTERRUPT OFF 100 ; The number is after , If you don't write it, it means all Interrupt All set OFF
PTP HOME Vel= 100 % DEFAULT
END
;-------------------------------------
def robot_stop()
INTERRUPT OFF 100
BRAKE
WAIT FOR (E_stop)
CONTINUE
INTERRUPT ON 100
Endexample 2:
DEF CELL ( )
INIT
BASISTECH INI
$out[appl_run]=false
CHECK HOME
PTP HOME Vel= 100 % DEFAULT
AUTOEXT INI
LOOP
INTERRUPT DECL 100 WHEN $out[236]==TRUE do Backhome() ; Statement interrupted 100
...
INTERRUPT ON 100 ; Turn on interrupt 100
P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
SWITCH PGNO ; Select with Programnumber
CASE 9
P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
purge ( ) ; Call purge
DEFAULT
P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 )
ENDSWITCH
INTERRUPT OFF 100 ; Turn off interrupt 100
ENDLOOP
END
;==========================================================
DEF Backhome() ; Interrupt subroutine
INTERRUPT OFF 100 ; After the interrupt takes effect, turn off the interrupt to prevent multiple triggering
$TIMER_STOP[2]=TRUE
$TIMER[2]=0
BRAKE ; Terminate the current action
PTP XHOME ; return Home spot ( Can't track approaching in interrupt )
...
RESUME ; Returns the trigger location at the declarator level
END边栏推荐
猜你喜欢

windows平台下的mysql启动等基本操作

A simple but scalable feature normalization method

元代理模型可迁移对抗攻击

“授权同意”落地压力大?隐私计算提供一种可能的合规“技术解”

Real test = "half product + Half development"?

如何创建虚拟形象

知道创宇为能源行业资产管理助力,入选工信部2021物联网示范项目

我的远程办公初体验 | 社区征文

Naacl 2022 | distillation of machinetranslation SOTA model

Us chips are hit hard again, and Intel may be defeated by TSMC and reduced to the third place in the world
随机推荐
关于harbor私有仓库忘记登录密码
Why does selenium become the first choice for web automated testing? (source code attached)
Basics | draw arcs in the physics engine
如何创建虚拟形象
Freedom自由协议质押挖矿系统开发
6.25AtCoderABC257E - Addition and Multiplication 2题解
研究所的这些优势真香!上岸率还极高!
NAACL 2022 | 机器翻译SOTA模型的蒸馏
@Difference between component and @configuration
Redis布隆过滤器和布谷鸟过滤器
Advanced webgl performance optimization
c# 国内外ORM 框架 dapper efcore sqlsugar freesql hisql sqlserver数据常规插入测试性能对比
SAAS 服务的优势都有哪些
535. TinyURL 的加密与解密 / 剑指 Offer II 103. 最少的硬币数目
C comparison of the performance of dapper efcore sqlsugar FreeSQL hisql sqlserver, an ORM framework at home and abroad
如何在 PowerPoint 中向幻灯片添加 SmartArt?
curl: (56) Recv failure: Connection reset by peer
2020版KALI安装教程
Gradle下载慢或无法下载
函数计算异步任务能力介绍 - 任务触发去重