一文解析KUKA CELL程序

程序结构:
def cell()
automatik extern
folgenummerberechnen
folgestarten
-cell的功能:只能检测是否在原点,plc给入的程序号是否正确,打开folgen程序。
automatik extern -外部自动
-主要是初始化设置,检测机器人是否在原位,是否在外部自动状态。
int i,j,cell_cnt
bool is_any_bit
step=0-变量置0,证明在cell程序的开始步
pgno=0-执行的程序号置0
cell_cnt=0-变量置0,
p0_merker=true -返回在原位条件
-$out[pf0]=(p0_merker or(downloadactive and ($mode_op==#ex))) and $in_home
- 发出机器人在原位的条件-
$out[lpkt]=false -关闭a14结束机器人程序在最后一点
vw_inb=false ; -外部自动程序还没有运行
vw_cby_cell=true–已经在cell
vw_call_cell=false–关闭调用cell
if $mode_op==#ex then -工作模式:外部自动
if not $in_home then-如果没有在机器人原点会提示:
$loop_msg[]=
$loop_msg[]=keyword_waitingforpf0–等在钥匙语言——pf0机器人在原位
$loop_cont=true
waitfor($in_home) or ( not $loop_cont and($mode_op#ex))
$loop_msg[]=
endif
endif
folgenummerberechnen- 程序号的核实
-检查程序号是否大于0 ,- 机器人状态是否在轨迹上,-sps指令是否在执行-是否在外部自动
if(p_old0) and ($mode_op==#ex)then
-上次的程序号- 外部自动状态-
if p_type==0 then;外部自动号输入方式:0
pgno=p_select–上次的程序号的存储
step=1
else;-其他程序控制方式时,如1
if(p_select>0) and (p_select0) and ($mode_op#ex)then–不是外部自动-
if p_type==0 then
pgno=p_select
step=1
else;1 aus n
if(p_select>0) and (p_select0) and (p_old<17)then
pgno=1
for i=1 to(p_old-1)
pgno=pgno*2
endfor
step=1
else
pgno=0
step=0
endif
endif
endif
cell_cnt=cell_cnt+1
else
if $on_path then-机器人在轨迹上
step=0
endif
endif
if($pro_state0#p_active)then-sps程序没有在激活状态-
$loop_msg[]=
$loop_msg[]=keyword_startspssub
-提示激活sps后台程序-
$loop_cont=true
waitfor($pro_state0==#p_active)-sps程序激活状态-
$loop_msg[]=
endif
$loop_msg[]=keyword_warteaufgueltigefolgenummer
-提示等待机器人程序号给输入
ifstep==0 then
is_any_bit=false
repeat-循环执行指令
out_wproz=false
out_wslav=true
if(prg_nr <= 0)then–程序号输入不正确(a1 – a8)
is_any_bit = false
pgno=0
else
is_any_bit = true–程序号位检测正确
pgno = prg_nr-正确,输入程序号大于0
endif
until is_any_bit-退出指令条件
out_wproz=false
out_wslav=false
endif
step=0
folgestarten打开folge程序
-程序启动-
switch p_type -程序使用类型选择
case 0 ;-以整数形式接受发出程序号
switch pgno
case 10-如程序满足选择程序10
folge10()-执行程序10
case 124
folge124()
case 125
folge125()
endswitch
case 1 以2进制控制程序号
switch pgno
case 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768
switch pgno
case-1
endswitch
endswitch
endswitch
waitsec 0.001
endloop

无人机未来的主航道是往哪里
荣耀9和nova2市场对比,ov价格高的原因原来在这里
【洞见芯趋势】流浪地球2中的人工智能Moss,离我们还远吗?
DDR 184PIN 底视图
从单片SoC向异构芯片和小芯片封装的转变正在加速
一文解析KUKA CELL程序
宜兴市司法局首次采用心理测评结合VR设备 助力社区矫正
劳斯莱斯推便携式座椅套件,售价5.7万元起
什么是声发射监测?
电磁辐射检测器,EMI detector
蒲公英助力AI管道机器人智能检测,构建安全城市
模拟和数字电路基础知识汇总
电源管理:原理、问题和部件
锂离子电池保护电路的原理和特性要求
iphone8什么时候上市最新消息:十周年纪念无望,iphone8将推迟发布,只剩iphone7s撑场
昆仑芯AI加速器组R480-X8满足大型模型训练和推理的需求
中国3D视觉市场增速超100% 中国机器视觉市场增速超45%
华硕ZenPad 3s平板轻薄美观 质感出众
更智能的相机给您带来哪些灵感?
高功率导通高压驱动控制电源ICSM2325E与CYT1000谁更好?