三菱机器人程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

三菱机器人程序 Prepared on 24 November 2020

'//////////////定义输入////////////

Def Io in0=Bit,0

Def Io in1=Bit,1

Def Io in3=Bit,3

Def Io in4=Bit,4

Def Io in5=Bit,5

Def Io in6=Bit,6

Def Io in7=Bit,7

Def Io in8=Bit,8

Def Io in9=Bit,9

Def Io in10=Bit,10

Def Io in11=Bit,11

Def Io in12=Bit,12

Def Io in13=Bit,13

Def Io in14=Bit,14

Def Io in15=Bit,15

'///////////////定义/输出//////////

Def Io out0=Bit,0

Def Io out1=Bit,1

Def Io out3=Bit,3

Def Io out4=Bit,4

Def Io out5=Bit,5

Def Io out6=Bit,6

Def Io out7=Bit,7

Def Io out8=Bit,8

Def Io out9=Bit,9

Def Io out10=Bit,10

Def Io out11=Bit,11

Def Io out12=Bit,12

Def Io out13=Bit,13

Def Io out14=Bit,14

Def Io out15=Bit,15

'//////////////定义变量//////////////

Def Jnt jyd '定义安全点Def Plt1,p11,p17,p71,p77,4,4,1'定义托盘点j1=(+,,+,+,+,+

jyd=(+,,+,+,+,

p0=(+,+,+,+,+,+(0,0)

p200=(+,+,+,+,+,+(0,0)

p201=(+,+,+,+,+,+(0,0)

p202=(+,+ ,+,+,+,+(0,0)

p203=(+,+,+,+,+,+(0,0)

p204=(+,+,+,+,+,+(0,0)

'////////////托盘点//////////////

p12=p11

p21=p11

=+12

=+12

=+12

=+12

p15=(Plt1,3) p16=p15

p25=p15

p26=p15

=+12

=+12

=+12

=+12

p31=(Plt1,8) p32=p31

p41=p31

p42=p31

=+12

=+12

=+12

=+12

p35=(Plt1,6) p36=p35

p45=p35

p46=p35

=+12

=+12

=+12

=+12

p51=(Plt1,9) p52=p51

p61=p51

p62=p51

=+12

=+12

=+12

=+12

p55=(Plt1,11) p56=p55

p65=p55

p66=p55

=+12

=+12

=+12

=+12

p75=(Plt1,14)

p85=p75

p86=p75

=+12

=+12

=+12

=+12

p72=p71

p81=p71

p82=p71

=+12

=+12

=+12

=+12

'///////////////判断/////////////

If M_In(9)=1 And M_In(10)=0Then'判断3个夹具是否在原位If M_In(11)=0 And M_In(13)=0Then

GoSub *fw '程序fw

EndIf

EndIf

If M_In(9)=1 And M_In(10)=1Then'判断1夹具是否在原位If M_In(11)=0 And M_In(13)=0Then

GoSub *fw1 '夹具1复位

EndIf

EndIf

If M_In(9)=1 And M_In(10)=0Then'判断夹具2是否在原位If M_In(11)=1 And M_In(13)=0Then

GoSub *fw2 '夹具2复位

EndIf

EndIf

If M_In(9)=1 And M_In(10)=0Then'判断夹具3是否在原位

If M_In(11)=0 And M_In(13)=1Then

GoSub *fw3 '夹具3复位

EndIf

EndIf

If M_05#>3Then

out14=1

M_05#=0

EndIf

If M_In(6)=1 And M_05#=0Then

GoSub *ks1 '一次装机

EndIf

If M_In(6)=1 And M_05#=1Then

GoSub *ks2 '二次装机

EndIf

If M_In(6)=1 And M_05#=2Then

相关文档
最新文档