FANUC: Example picking program
The .ls-file for a this program is also provided a .zip-folder in the Downloads.
Example program vacuum
1: !Init
2: UFRAME_NUM=0
3: UTOOL_NUM=1
4: PAYLOAD [1:EOAT w/o part]
5: !Insert routine for gripper open
6: DO[101:Vacuum pump]=OFF
7:
8: !Pick loop
9: LBL[1]
10:
11: !Move to capture pose
12:J PR[1:Capture_pose] 100% FINE
13:
14: !Set Skill-ID and Workspace-ID
15: SR[2:Workspace-ID]=SR[6]
16: SR[3:Skill-ID]=SR[8]
17:
18: !Take capture
19: CALL RB_VISION(CONNECT)
20: CALL RB_VISION(GET PICK POSE)
21: CALL RB_VISION(CLOSE)
22:
23: !Pick part
24: IF (F[16:RBV_HAS_RESULT]=ON) THEN
25:J PR[16:rb_pickpose] 100% CNT100 Tool_Offset, PR[17:pre_pick_offset]
26:
27: !Sensitive move to pick position
28: CALL -INST_TOUCHSKIP_CRX(1,PR[16:rb_pickpose],50,10,10,0,0,0,0,0)
29:
30: !Pick Part/Glose gripper/Vacuum on
31: DO[101:Vacuum pump]=ON
32: WAIT .5(sec)
33:
34: !Remove part from bin
35:L PR[16:rb_pickpose] 100mm/sec CNT100 Tool_Offset, PR[17:pre_pick_offset]
36:
37: !Check pick success with vacuum sensor
38: R[1]=AI[1:Vacuum sensor]
39: IF R[1]<300, JMP LBL [2]
40:
41:
42: !Place Part
43:J PR[2:Place_position] 100% CNT100 Tool_Offset, PR[22:Place_offset]
44: CALL -INST_TOUCHSKIP_CRX(1,PR[21:place position],30,10,10,0,0,0,0,0)
45: DO[101:Vacuum_pump]=OFF
46: WAIT .5(sec)
47:L PR[2:Place position] 100mm/sec CNT100 Tool_Offset, PR[22: Place offset]
48: ENDIF
49:
50: LBL[2]
51: DO[101:Vacuum pump]=OFF
52:
53: JMP LBL[1]
[END]
Last updated