莫托曼机器人测温程序

1机器程序

2.1 主程序
MAIN:
NOP
CALL JOB:ORG
*1
JUMP *5 IF IN#(41)=OFF
CALL JOB:远程 IF IN#(25)=ON
CALL JOB:本地 IF IN#(26)=ON
CALL JOB:测距判断
CALL JOB:最后一支
*5
CALL JOB:PZ IF IN#(35)=ON
CALL JOB:PZ IF IN#(65)=ON
JUMP *1
END

1.2 本地程序
1、本地:
NOP
CALL JOB:分步 IF IN#(22)=ON
CALL JOB:单循环 IF IN#(23)=ON
END
2、分步:
NOP
CALL JOB:装CW枪头 IF IN#(28)=ON
CALL JOB:装DY枪头 IF IN#(29)=ON
CALL JOB:装QY枪头 IF IN#(27)=ON
CALL JOB:下枪2 IF IN#(31)=ON
CALL JOB:下枪1 IF IN#(32)=ON
END
3、单循环:
NOP
CALL JOB:测温 IF IN#(28)=ON
CALL JOB:定Y IF IN#(29)=ON
CALL JOB:取Y IF IN#(27)=ON
END

1.3 远程程序
1、远程:
NOP
CALL JOB:PC-手动 IF IN#(73)=ON
CALL JOB:PC-自动 IF IN#(74)=ON
END
2、PC-手动:
NOP
JUMP JOB:装CW枪头 IF IN#(60)=ON
JUMP JOB:装DY枪头 IF IN#(61)=ON
JUMP JOB:装QY枪头 IF IN#(62)=ON
JUMP JOB:下枪1 IF IN#(63)=ON
JUMP JOB:下枪2 IF IN#(64)=ON
END
3、PC-自动:
NOP
CALL JOB:测温 IF IN#(60)=ON
CALL JOB:定Y IF IN#(61)=ON
CALL JOB:取Y IF IN#(62)=ON
END

1.4 其他程序
1、ORG:
NOP
SET B040 0
SET B041 0
SET B042 0
SET B043 0
DOUT OT#(56) OFF
DOUT OT#(148) OFF
DOUT OT#(149) OFF
DOUT OT#(150) OFF
DOUT OT#(145) OFF
DOUT OT#(146) OFF
DOUT OT#(147) OFF
DOUT OT#(233) OFF
DOUT OT#(234) OFF
DOUT OT#(235) OFF
DOUT OT#(25) OFF
DOUT OT#(26) OFF
DOUT OT#(27) OFF
DOUT OT#(29) OFF
DOUT OT#(30) OFF
DOUT OT#(51) OFF
DOUT OT#(52) OFF
DOUT OT#(53) OFF
END
2、测距判断
NOP
JUMP *CJ IF D011<-600000
JUMP *CJ IF D012>600000
JUMP *CJ0 IF D011=0
JUMP *CJ0 IF D012=0
JUMP *CJ0 IF IN#(82)=ON
JUMP *CJEND
*CJ
JUMP *CJEND IF D011<-800000
JUMP *CJEND IF D012>800000
DOUT OT#(73) ON
JUMP *CJEND1
*CJ0
DOUT OT#(73) OFF
JUMP *CJEND1
*CJEND1
*CJEND
END
3、最后一支
NOP
JUMP *L1 IF B003=40
JUMP *L2 IF B013=48
JUMP *L3 IF B023=32
JUMP *L4
*L1
DOUT OT#(147) ON
JUMP *L4
*L2
DOUT OT#(145) ON
JUMP *L4
*L3
DOUT OT#(146) ON
*L4
END
4、装CW枪头:
NOP
JUMP *21 IF B050=1
DOUT OT#(26) ON
DOUT OT#(51) ON
CALL JOB:测温弹仓
CALL JOB:测温装枪
SET B052 1
TIMER T=0.20
DOUT OT#(51) OFF
DOUT OT#(26) OFF
SET B050 1
TIMER T=0.50
*21
END
5、装DY枪头:
NOP
JUMP *22 IF B050=1
DOUT OT#(27) ON
DOUT OT#(52) ON
CALL JOB:定y弹仓
CALL JOB:定Y装枪
SET B052 2
DOUT OT#(52) OFF
DOUT OT#(27) OFF
TIMER T=0.20
SET B050 1
TIMER T=0.50
*22
END
6、装QY枪头:
NOP
JUMP *23 IF B051=1
DOUT OT#(25) ON
DOUT OT#(53) ON
CALL JOB:取Y弹仓
CALL JOB:取Y装枪
TIMER T=0.20
DOUT OT#(53) OFF
DOUT OT#(25) OFF
TIMER T=0.20
SET B051 1
TIMER T=0.50
*23
END
7、下枪1:
NOP
JUMP *25 IF B051=0
DOUT OT#(30) ON
DOUT OT#(61) ON
TIMER T=0.20
CALL JOB:QY-X-X
DOUT OT#(61) OFF
DOUT OT#(30) OFF
TIMER T=0.20
SET B051 0
TIMER T=0.50
*25
END
8、下枪2:
NOP
JUMP *24 IF B050=0
JUMP *24 IF B052>2
JUMP *24 IF B052=0
DOUT OT#(29) ON
DOUT OT#(62) ON
JUMP *241 IF B052=1
JUMP *242 IF B052=2
*241
CALL JOB:CW-X-X
SET B052 0
TIMER T=0.50
JUMP *240
*242
CALL JOB:DY-X-X
SET B052 0
TIMER T=0.50
*240
TIMER T=0.20
DOUT OT#(62) OFF
DOUT OT#(29) OFF
TIMER T=0.20
SET B050 0
TIMER T=0.50
*24
END
9、测温:
NOP
DOUT OT#(26) ON
DOUT OT#(51) ON
CALL JOB:装CW枪头
TIMER T=0.30
CALL JOB:下枪2
DOUT OT#(51) OFF
DOUT OT#(26) OFF
END
10、定Y:
NOP
DOUT OT#(27) ON
DOUT OT#(52) ON
CALL JOB:装DY枪头
TIMER T=0.30
CALL JOB:下枪2
DOUT OT#(52) OFF
DOUT OT#(27) OFF
END
11、取Y:
NOP
DOUT OT#(25) ON
DOUT OT#(53) ON
CALL JOB:装QY枪头
TIMER T=0.30
CALL JOB:下枪1
DOUT OT#(53) OFF
DOUT OT#(25) OFF
END

你可能感兴趣的:(机器人)