机器人RIP的控制程序解析

工程项目的标准化统一对工业公司来说是降低各种成本的关键,一个发展了50-60年还没有自我工程标准的工业企业是不可能有发展的,就好像一个品牌说了半天怎么怎么好,但还没有实现产业化,一切都是空谈,就是在烧钱。
下面是 一个经典的标准化的机器人程序控制的架构案例:
rip1的io区域: 513-520
e513 k1水流量合格 a513 kyp01ae 开水
e514bv01wmin 水流量低位检测(no高于低压值才有信号)
e515bv01wmax 水流量高位检测(nc 超过高压没有信号)a515 kyp01aa 关水
e516bd01nd 低压气合格
在makro57 中使用的f量:;%{e}%mkukatpvw%cvw_com %vcomment %p 2:-- vw kuehlwasserbeschaltung --, 3: vw_comment
;fold f819 = ein激活 ;fold –带循环水控制—
f820 = ein 不使用循环水
f817 = ein 用于不使用低压气用于屏蔽发出给plc的故障代码
f818 是否关闭机器人在闲置时间超过15分钟后关水的功能,正常f818是aus的
功能介绍:
1.当正确量的水流过时,入口(#冷却水最小值= true)和(#冷却水
最大= true)。
2.如果水流量太低,输入(#冷却水最小= false),输入(#冷却水
最大= true)。 没水
3.如果水流量太高,输入(#冷却水最小值= true),input(#冷却水
最大= false)。电极脱落
usr_s.src文件调用程序vw_wasser() -使得水控制程序在程序中实时执行
globaldef vw_wasser() –声明一个全局性质的程序
1.-不带循环水
if not mit_vw_wass and ($flag[f_o_wasser] orohne_vw_was) and not$flag[f_kwy01ein] then
- 没有选择有水-有f820(不带水) 或者没有水-没有f819水阀启动(f819带水)
- mit_vw_wass带水的状态- ohne_vw_was不带水的状态-
if not $in[i_bd01nd] or (not $in[i_bd02nd] and $flag[f_mit_rip2]) or (not $in[i_bd03nd]and $flag[f_mit_rip3])then
-e516低压气检测-f_mit_rip2=142 f142带2个rip
$out[o_r_med_ein]= false-a25反馈给plc有介质
else
$out[o_r_med_ein]= true -此时又低压气就可反馈机器人有介质
endif
if($out[o_r_pfo] and $out[o_r_sak])then -机器人在零点a15,在轨迹上a16
ohne_vw_was=false
else
ohne_vw_was=true -正常执行程序状态满足发出没有水
endif
endif
2.带水
if $flag[f_kwy01ein] or mit_vw_wass then-f819带水功能在makro57中被激活
- 有f819 或者带水模式在dat文件中给入true
if not med_ext_aus and not $out[o_r_med_ein] and notwasserstoe and $out[o_r_rk100] and $in[i_bd01nd] and ($in[i_bd02nd] or not $flag[f_mit_rip2]) and ($in[i_bd03nd] or not $flag[f_mit_rip3])then
-med_ext_aus外部信号使水关闭-没有发出a25介质反馈-没有水故障-机器人有rk100(a10)-e516低压气检测-2号站低压气或者没有f142 .....
-首先要带水f819 机器人不能有水流量故障,不由外部关水,要有低压气检测e516
-f142 之类当有1个rip时f142=flase
if not timer_abge and not t_sg_abgel then-两个超时有一个没有就没有a25
-没有超过机器人闲置时间15分钟(timer_abge/ t_sg_abgel)
$out[o_r_med_ein]=true -a25机器人有介质
endif
endif
if($out[o_r_pfo] and $out[o_r_sak])then
-a15机器人在零位-a16 机器人在轨迹上
mit_vw_wass=false
else
mit_vw_wass=true -用于当机器人不再零点也不在轨迹时使循环可以继续
endif
if(not $out[o_r_rk100] and wasserstoe and wasser_ein) or not$in[i_bd01nd] or (not $in[i_bd02nd] and $flag[f_mit_rip2]) or (not $in[i_bd03nd] and $flag[f_mit_rip3] ) then
-机器人rk100被断开,有水故障和水启动-没有低压气或不足
med_ext_aus=true -外部条件引起水被关闭激活
if(vw_feh_nr==20)then –故障号反馈给plc是20号
- 在vwfeh_loop()程序中定义故障号20 与ed_ext_aus的关系
- if(med_ext_aus)then
-vw_feh_nr=20
- endif
$out[o_r_med_ein]=false -关闭a25介质反馈
endif
else
med_ext_aus=false -否则就没有外部条件引起水被关闭激活
endif
if not $out[o_r_rk100] and not wa_hifu_rest then
-当没有rk100,也没有wa_hifu_rest水的计时器复位中间变量-例如:打开安全门
wa_hifu_rest=true
$timer_stop[t_wasser_ein]=true -停止计时器t55水流开启时间
endif
if $out[o_r_rk100] and wa_hifu_rest then
-断开rk100后再次恢复的状态
$out[o_r_med_ein]=true -a25再次发出
wa_hifu_rest=false关闭中间变量
wasserstoe=false-关闭水故障
$flag[f_t_wa_wstoe]=false -水故障
$timer_stop[t_wasser_sto]=true –t56水故障计时器开始复位清零
$timer[t_wasser_sto]=0
$timer_stop[t_wasser_sto]=false
$timer_stop[t_wasser_ein]=true -t55水启动计时器开始复位清零
$timer[t_wasser_ein]=0
$timer_stop[t_wasser_ein]=false
$timer_stop[t_stellglie]=true -t54水控制计时器开始复位清零
$timer[t_stellglie]=0
$timer_stop[t_stellglie]=false
endif
if not wasserstoe then -如果没有水故障
-水流量超过最大流量故障-可认为是电极帽掉了/漏了
if($in[i_bv01wmin] and not $in[i_bv01wmax]) or ($in[i_bv02wmin] andnot $in[i_bv02wmax]) or ($in[i_bv03wmin]and not $in[i_bv03wmax])then
-e514 有低压水和没有高压水e515-
-正常情况下是e514和e515高低水都有,当水压制超过高压水时e515会变为flase
-因此在调解水流量阀时因该注意高压水压力值不能太大。
w_max_rip1=$in[i_bv01wmin] and not $in[i_bv01wmax]
-有低压水没有高压水为高压水故障,常用与电极帽掉的水压检测
w_max_rip2=$in[i_bv02wmin] and not $in[i_bv02wmax]
w_max_rip3=$in[i_bv03wmin] and not $in[i_bv03wmax]
$timer_stop[t_wasser_sto]=false -当出现故障时计时器t56开始计时
if($timer[t_wasser_sto]>wa_stoer_z)then
-当t56超过4 s时报水故障,开始关rip的水
wasserstoe=true-报水流量故障
$flag[f_t_wa_wstoe]=true –f816水故障提示
$timer_stop[t_wasser_sto]=true –t56暂停
$out[o_kyp01wa]=true –a515水关
$out[o_kyp01we]=false –a513 水开被关闭
$out[o_kyp02wa]=true
$out[o_kyp02we]=false
$out[o_kyp03wa]=true
$out[o_kyp03we]=false
endif
else -如果没有超时4 s,t56计时器复位
$timer_stop[t_wasser_sto]=true
$timer[t_wasser_sto]=0
$timer_stop[t_wasser_sto]=false
endif
if $out[o_r_rk100] then -有机器人rk100请求驱动
if($flag[f_wa_ein_vsp] or (not $out[o_r_pfo] and not $out[o_r_wartb] and$out[o_r_sg_gesp]))then
-f818在morko80中使用消除自动关水问题
-机器人不再零位a15-机器人没在维修位置a17-程序始终在执行a23
- 如果激活了f818 那么开水时间t55会被一直复位,在没有水故障的条件下。
- 当机器人开始移动后t55奖杯清零
$timer_stop[t_wasser_ein]=true –t55清零
$timer[t_wasser_ein]=0
$timer_stop[t_wasser_ein]=false -开始计时
endif
endif –一旦开始计时,机器人还没有执行程序在零位或一直在维修位置,或停止在过程停止都不会使t55定时器复位一直开始计时直道900000ms后停止
timer_abge=($timer[t_wasser_ein]>wa_aus_naz)-没有故障时t55大于15分钟
-当开始执行程序时t55被重新值0 timer_abge变为flase
- wa_aus_naz=900000
if timer_abge and not$timer_stop[t_wasser_ein] then
-大于15分钟后 –还没有t55计时器停止
$timer_stop[t_wasser_ein]=true –让计时器停止
endif
if $out[o_r_rk100] then -机器人只要有rk100请求驱动
$timer_stop[t_stellglie]=true –t54清零
$timer[t_stellglie]=0
$timer_stop[t_stellglie]=false --开始计时
endif -他只记录没有rk100后的时间,超时时间也是900000ms
t_sg_abgel=($timer[t_stellglie]>wa_aus_sza)
--当开始发出rk100时t54被重新值0 t_sg_abgel变为flase
if t_sg_abgel and not$timer_stop[t_stellglie] then
$timer_stop[t_stellglie]=true –让计时器停止
endif
if $out[o_r_rk100] and notwasserstoe and not wasser_ein and not $flag[281] and not $flag[283] then
-机器人有使能-没有水故障-水没有启动-没有f281-没有f283/一般用f281就可实现开关水
-本段的意思是正常时会保持rip开着水
wa_zustand=1 -rip开水
endif
if(timer_abge or t_sg_abgel) and not $flag[f_wa_ein_vsp] then
- 机器人闲置超时-没有f818(关闭设备自动状态时闲置时间超过15分钟后关水)
med_ext_aus=false -关闭外部关水
if(vw_feh_nr20)then –闲置时间超过15分钟后关主hip的水-
-其他一水流量故障只故障代码不等于20就都会关闭a25
$out[o_r_med_ein]=false -关闭a25会引起主杠hip的5s后关水
endif
else
med_ext_aus=false
endif
if($out[o_r_rk100] and ($flag[281] or $flag[283] or wasserstoe or not$in[i_medienei]))then
-rip关水的条件:机器人有使能请求rk100-有f281-或有f283-或有水故障-或plc没有发出e25
wa_zustand=2 -rip关水
endif
---------------------------------------------------------------------
if $flag[819] and $flag[820] then -直接控制开关水
-f819在makro57里赋值为ture,f820直接给水- 不受到其他条件的控制只开水.
wa_zustand=1 -rip开水
endif
---------------------------------------------------------------------
switch wa_zustand
case 1
;wasser ein
$out[o_kyp01wa]=false
$out[o_kyp01we]=true -a513开水阀
$out[o_kyp02wa]=false
$out[o_kyp02we]=true
$out[o_kyp03wa]=false
$out[o_kyp03we]=true
wasser_ein=true –水阀启动
case 2
;wasser aus
$out[o_kyp01wa]=true -a515水阀关
$out[o_kyp01we]=false
$out[o_kyp02wa]=true
$out[o_kyp02we]=false
$out[o_kyp03wa]=true
$out[o_kyp03we]=false
wasser_ein=false -水阀关
default
endswitch
endif
endif
end

造成SAR ADC内总谐波失真的源头在哪
海尔获Wi-Fi联盟HE MTG副主席 掌握智能家居标准制定主动权
威马汽车与中移物联网举行战略合作签约仪式
传感器激光焊接技术的介绍
射频导纳物位开关-全球百科
机器人RIP的控制程序解析
离子平衡测试仪器的构成
我国工业设计行业发展趋势分析
国产串行SRAM存储芯片EMI7008LSMI的介绍
基于Hi3516开发板的智能猫眼设计
碧桂园的首家机器人餐厅已正式亮相
赋能工业智造,新拓三维Tube Qualify 弯管检测系统发布
海尔无尾电视技术深解
TDA7266各引脚功能及电压
CBB81脚距15mm与20mm的区别有哪些?
太阳能频振式杀虫灯是什么,它的工作原理是怎样的
中芯国际投资的超级晶圆厂启动,月产能10万片
华为Mae40 Pro+后续依旧会缺货严重
BG资讯币虚拟货币分销商城开发
携手华为构建城市立体感知体系,深开鸿参加城市智能体大模型创新峰会