当前位置:网站首页>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
End
example 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
边栏推荐
- 2022 software evaluator examination outline
- @Component与@Configuration区别
- Review of mathematical knowledge: curve integral of type I
- 线段树、树状数组模板(复制粘贴确实好用)
- 如何利用OpenMesh实现不同格式的3D文件间的转换
- InheritableThreadLocal 在线程池中进行父子线程间消息传递出现消息丢失的解析
- Naacl 2022 | distillation of machinetranslation SOTA model
- Subgraphs in slam
- 有遇到用flink-cdc采集MySQL-RDS的时候,datetime类型的字段,采集过来后和源表
- 自学结构体(小甲鱼c语言)
猜你喜欢
基于汇编实现的流载体的LSB隐藏项目
[untitled]
Paper notes: e (n) equivariant graph neural networks
NVIDIA安装最新显卡驱动
Tencent cloud released the upgraded version of CDW Clickhouse to provide a fast experience for massive data real-time analysis scenarios
基于深度学习的Wiki中文语料词word2vec向量模型
mysql数据库扫盲,你真的知道什么是数据库嘛
函数计算异步任务能力介绍 - 任务触发去重
【南京大学】考研初试复试资料分享
微信小程序开发储备知识
随机推荐
垃圾收集器
【Oracle】基础知识面试题
Solid state storage manufacturer Yilian joins dragon dragon community to build a new open source ecosystem
机器学习8-人工神经网络
Basics | draw arcs in the physics engine
controller、service、dao之间的关系
深度剖析monai(一) Data和Transforms部分
腾讯云发布CDW ClickHouse升级版,为海量数据实时分析场景提供极速体验
@Difference between component and @configuration
windows平台下的mysql启动等基本操作
MySQL foundation - multi table query
InheritableThreadLocal 在线程池中进行父子线程间消息传递出现消息丢失的解析
Kotlin basic grammar
腾讯云发布自动化交付和运维产品Orbit,推动企业应用全面云原生化
I, a tester from a large factory, went to a state-owned enterprise with a 50% pay cut. I regret it
2022 software evaluator examination outline
LSB hidden items of stream carrier based on assembly implementation
KUKA机器人外部轴配置你一定要知道的那些知识
In depth analysis of Monai (I) data and transforms
卷妹带你学jdbc—2天冲刺Day1