10 '---|
20 '| program for mps station assembly with robot / | 30 '| Programm für die MPS Station Montage mit Roboter | 40 '--- 50 '| Author : Andreas HOPF DE-RD 30.01.02 robot type MV-2AJ | 60 '| | 70 '| folgende Positionen müssen geteacht werden/these positions must be teached | 80 '|---|
90 '| | 100 '| P1 take up preceding station red part / Aufnahme Vorgängerstation rotes Teil | 110 '--- 120 '| P2 assembly module inner teach position outer position in direction robot | 130 '| parallel x axis | 140 '| Montagemodul Teachposition Innengreifposition Aussengreifposition in Richtung Roboter, | 150 '| parallel X-Achse | 160 '--- 170 '| P3 type of cylinder at ungripp position / Zylindertyp Umgreifposition | 180 '--- 190 '| P4 gripping position magazine spring / Greifposition Magazin Feder | 200 '--- 210 '| P5 Teachposition Kolbenpalette / teaching position pallet of pistons | 220 '--- 230 '| P6 slide succeeding station / Rutsche Nachfolgestation | 240 '--- 250 '| P7 cover available / Deckel da | 260 '--- 270 '| P8 spring available / Feder da | 280 '--- 290 '| P9 Deckelabholposition / getting position of covers | 300 '---
330 '--- 340 '| *WPart (Unterprogramm/Subroutine) | 350 '--- 360 '| Für 3 Sekunden auf Werkstück am Stationseingang | 370 '| warten,nach Ablauf der Zeit muss Werkstück noch | 380 '| vorhanden sein, sonst für weitere 3 Sekunden warten | 390 '| Waiting for 3 sec. for a workpiece at the material | 400 '| interchange point. After the expirence of the 3 sec. | 410 '| the workpiece must be still present otherwise wait | 420 '| 3 more sec. | 430 '--- 440 '
450 '--- 460 '| *GETCYL (Unterprogramm/Subroutine) | 470 '--- 480 '| Werkstück mit dem Außengreifer vom Material- | 490 '| eingang abholen | 500 '| Get workpiece with the auter gripper | 510 '--- 520 '
530 '--- --- 540 '| *PLACECYL (Unterprogramm/Subroutine) | | *TestOr (Unterprogramm/Subroutine) | 550 '--- --- 560 '| Werkstück auf der Umgreifposition des Montagemoduls | | Ermittlung der Orientierung. Es wird die positive | 570 '| ablegen, die Teileart ermitteln, Orientierung er- | | Flanke erkannt. Bei Winkeln über 140 Grad bleibt | 580 '| mitteln und auf der Montageposition ablegen | | das Programm stehen | 590 '| Deposit the workpiece at the regrip position, | | Identification of the orientation. The positive | 600 '| identify the materialtyp, orientation and deposit | | Edge is dedected. If the angle is bigger then 140 | 610 '| at the assembly position | | degree the program will be stopped | 620 '--- --- 630 '
640 '--- 650 '| *GETPIST (Unterprogramm/Subroutine) | 660 '--- 670 '| Abholung eines Kolbens aus der Palette. Es wird | 680 '| nicht überprüft, ob das Teil vorhanden ist. | 690 '| Getting the piston out of the pallet. It is not | 700 '| tested if a part is available | 710 '--- 720 '
730 '--- 740 '| *ASSPIST (Unterprogramm/Subroutine) | 750 '--- 760 '| Ablegen des Kolbens im Zylinder | 770 '| Deposition of the piston in the cylinder | 780 '--- 790 '
800 '--- 810 '| *GETSPRG (Unterprogramm/Subroutine) | 820 '--- 830 '| Abholung der Feder aus dem Federmagazin. | 840 '| Zum Erkennen der Feder fährt der Greifer mit dem | 850 '| Sensor zyklisch 3 mal in 0.5 mm Abständen an die | 860 '| Aholstelle vorbei bis eine Feder vorhanden ist | 870 '| Getting the spring out of the magazine | 880 '| for identification of the spring the gripper is | 890 '| cyclely moveing the sensor 3 times with 0.5 mm | 900 '| steps at the interchange point until a spring is | 910 '| present. | 920 '--- 930 '
940 '--- 950 '| *ASSSPRG (Unterprogramm/Subroutine) | 960 '--- 970 '| Ablegen der Feder im Zylinder | 980 '| Deposition of the spring in the cylinder | 990 '--- 1000 '
1010 '--- 1020 '| *GETCOVER (Unterprogramm/Subroutine) | 1030 '--- 1040 '| Deckel von der Hydraulikstation holen. Der Greifer | 1050 '| holt sich den Dorn. Mit dem Dorn wird der Deckel | 1060 '| geholt und gedreht abgelegt. Anschliessend wird der | 1070 '| Dorn wieder abgelegt und der Deckel abgeholt. | 1080 '| Getting the cover out of the hydraulikstation. The | 1090 '| gripper is getting the thorn. With the thorn the | 1100 '| cover is getted an turned. After this the thorn is | 1110 '| deposited and the cover can be taken | 1120 '--- 1130 '
1140 '--- --- 1150 '| *ASSCOVER (Unterprogramm/Subroutine) | | *TestOr (Unterprogramm/Subroutine) | 1160 '--- --- 1170 '| Orientierung des Deckels mit anschließender Montage | | Ermittlung der Orientierung. Es wird die positive | 1180 '| Orientation of the cover and assembly | | Flanke erkannt. Bei Winkeln über 140 Grad bleibt | 1190 '| | | das Programm stehen | 1200 '| | | Identification of the orientation. The positive | 1210 '| | | Edge is dedected. If the angle is bigger then 140 | 1220 '| | | degree the program will be stopped | 1230 '--- --- 1240 '
1250 '--- 1260 '| *DEPRYPRT (Unterprogramm/Subroutine) | 1270 '--- 1280 '| Ferig montiertes Teil aus der Montageposition | 1290 '| abholen und auf der Rutsche ablegen. | 1300 '| Getting the assembled part from the assemly position | 1310 '| and deposition at the slide | 1320 '--- 1330
1340 ' definition of the positions / Definition der Positionen 1350
1360 DEF POS VECT30 'turning angle of assembly cover / Drehwinkel Montage Deckel 1370 DEF POS VECY50 'correction y-axis 50 mm / Korrektur Y-Achse 50 mm
1380 DEF POS VECZ2 'correction z-axis 2.5 mm / Korrektur Z-Achse 2.5 mm 1390 DEF POS VECZ5 'correction z-axis 5 mm / Korrektur Z-Achse 5 mm 1400 DEF POS VECZ30 'correction z-axis 30 mm / Korrektur Z-Achse 30 mm 1410 DEF POS VECZ50 'correction z-axis 50 mm / Korrektur Z-Achse 50 mm 1420 DEF POS VECZ100 'correction z-axis 100 mm / Korrektur Z-Achse 100 mm 1430 DEF POS VECZ200 'correction z-axis 200 mm / Korrektur Z-Achse 200 mm
1440 DEF POS VECZINT 'z intervall of meassurement spring present / Z Intervall Federvorhandenmessung 1450 DEF POS VECGA 'Korrektur Montageposition - Aussengreifposition Greifer
1460 'correction assembly position - regripp position 1470 DEF POS AUXPOS 'auxilary position / Hilfsposition
1480 DEF POS VECMINC 'meassurement intervall orientation meassurement / 1490 'Messintervall Orientierungsmessung
1500 DEF POS VECCACYL 'angle correction orientation meassurement /
1510 'Winkelkorrektur Orientierungsmessung - Montage Zylinder 1520 DEF POS VecCACov 'angle correction orientation meassurement /
1530 'Winkelkorrektur Orientierungsmessung - Montage Deckel 1540 DEF POS VECEP1 'final point palet 1 / Endpunkt Palette 1
1600 DEF POS VECCOZ 'Korrektur Teachposition - Orientierung Zylinder Position / 1610 'correction teachposition - orientation cylinder position 1620 DEF POS VECCOD 'Korrektur Teachposition - Orientierung Deckel Position / 1630 'correction teachposition - orientation cover position 1640 DEF POS VECCMPD 'Korrektur Teachposition - Montageposition Deckel / 1650 'correction teachposition - assembly position cover
1660 DEF POS VECCMPPS 'Korrektur Montageposition - Greifposition Feder,Kolben / 1670 'correction assembly position - gripp position spring,piston 1680 DEF POS VecCOC 'Korrektur Orientierungsmessung - Montageposition Zylinder / 1690 'correction orientation meassurement - assembly position cylinder 1700 DEF POS VECCOM 'Korrektur Orientierungsmessung - Montageposition Zylinder / 1710 'correction orientation meassurement - assembly position cylinder 1720 DEF POS VecCTPB 'Korrektur Teachposition - Abholstelle schwarze Kolben /
1730 'correction teachposition - pick up position black piston 1740 DEF POS VecCTPS 'Korrektur Teachposition - Abholstelle silberne Kolben / 1750 'correction teachposition pick up position silver piston 1760'
1770 VECT30 = (+0.00,+0.00,+0.00,+30.00,+0.00) 'turning angle of assembly cover / Drehwinkel Montage Deckel 1780 VECY50 = (+0.00,+50.00,+0.00,+0.00,+0.00) 'correction y-axis 50 mm / Korrektur Y-Achse 50 mm
1790 VECZ2 = (+0.00,+0.00,+2.50,+0.00,+0.00) 'correction z-axis 2.5 mm / Korrektur Z-Achse 2.5 mm 1800 VECZ5 = (+0.00,+0.00,+5.00,+0.00,+0.00) 'correction z-axis 5 mm / Korrektur Z-Achse 5 mm 1810 VECZ30 = (+0.00,+0.00,+30.00,+0.00,+0.00) 'correction z-axis 30 mm / Korrektur Z-Achse 30 mm 1820 VECZ50 = (+0.00,+0.00,+50.00,+0.00,+0.00) 'correction z-axis 50 mm / Korrektur Z-Achse 50 mm 1830 VECZ100 = (+0.00,+0.00,+100.00,+0.00,+0.00) 'correction z-axis 100 mm / Korrektur Z-Achse 100 mm 1840 VECZ200 = (+0.00,+0.00,+200.00,+0.00,+0.00) 'correction z-axis 200 mm / Korrektur Z-Achse 200 mm 1850 VecCUP = (+16.25,-30.25,-8.00,+0.00,+0.00) 'Korrektur Teachposition - Umgreifposition
1860 'correction teachposition regripp position
1870 VecCMPZ = (+56.25,-76.25,-25.00,+0.00,+0.00) 'Korrektur Teachposition - Montageposition Zylinder 1880 'correction teach position - assembly position cylinder 1890 VecCOM = (+15.00,-76.25,-19.00,+0.00,+0.00) 'Korrektur Orientierungsmessung - Montageposition Zylinder
1900 'correction orientation meassurement - assembly position cylinder 1910 VecCOC = (-16.25,-76.25,-1.10,+0.00,+0.00) 'Korrektur Orientierungsmessung - Montageposition Zylinder
1920 'correction orientation meassurement - assembly position cylinder 1930 VecCOZ = (-0.25,+0.00,-3.50,+0.00,+0.00) 'Korrektur Teachposition - Orientierung Zylinder Position
1940 'correction teachposition - orientation cylinder position
1950 VecCOD = (+32.50,+0.00,-21.50,+0.00,+0.00) 'Korrektur Teachposition - Orientierung Deckel Position 1960 'correction teachposition - orientation cover position 1970 VecCMPPS = (+56.25,-76.25,-18.00,-180.00,+0.00) 'Korrektur Montageposition - Greifposition Feder,Kolben 1980 'correction assembly position - gripp position spring,piston 1990 VecGA = (+40.00,+0.00,-2.00,+0.00,+0.00) 'Korrektur Montageposition - Aussengreifposition Greifer 2000 'correction assembly position - regripp position
2010 VecCTPB = (+55.00,-12.50,-23.00,-180.00,+0.00) 'Korrektur Teachposition - Abholstelle schwarze Kolben 2020 'correction teachposition - pick up position black piston 2030 VecCTPS = (-55.00,-12.50,-23.00,+0.00,+0.00) 'Korrektur Teachposition - Abholstelle silberne Kolben 2040 'correction teachposition pick up position silver piston 2050 VECZINT = (+0.00,+0.00,+0.50,+0.00,+0.00) 'z intervall of meassurement spring present /
'Z Intervall Federvorhandenmessung
2060 VECMINC = (+0.00,+0.00,+0.00,+1.00,+0.00) 'meassurement intervall orientation meassurement / 2070 'Messintervall Orientierungsmessung
2080 VECCACYL = (+0.00,+0.00,+0.00,-108.00,+0.00) 'angle correction orientation meassurement /
2090 'Winkelkorrektur Orientierungsmessung - Montage Zylinder 2100 VECCACOV = (+0.00,+0.00,+0.00,-65.00,+0.00) 'angle correction orientation meassurement /
2110 'Winkelkorrektur Orientierungsmessung - Montage Deckel 2120 VECEP1 = (+0.00,+100.00,+0.00,+0.00,+0.00) 'Endpunkt Palette 1 / final point palet 1
2130 VECEP2 = (+0.00,+100.00,+0.00,+0.00,+0.00) 'Endpunkt Palette 2 / final point palet 2 2140 '
2150 ' definition of external io adresses / Definition der externen EA Adressen 2160 DEF IO PART_AV = BIT,8 'Werkstück vorhanden / Workpiece available 2170 DEF IO B1 = BIT,9 'Teil ist nicht schwarz / part is not black
2180 DEF IO B2 = BIT,10 'orintation identification / Orientierungserkennung 2190 DEF IO IP_FI = BIT,15 'Folgestation frei / Subsequent station free
2200 DEF IO IP_N_FO = BIT,15 'Station belegt / station occupied 2210 '
2220 DEF ACT 1,M_IN(9)=1 GOSUB *INTR 'Definition Interruptroutine / definition interrupt routine 2230 ' definition of the internal variables / Definition interner Variablen
2240 DEF INTE CYLTYPE 'type of cylinder / Zylindertyp
2250 DEF INTE SLOW 'slow speed / langsame Geschwindigkeit 2260 DEF INTE FAST 'fast speed / schnelle Geschwindigkeit
2270 DEF INTE SUSLOW 'super slow speed / super langsame Geschwindigkeit
2280 DEF INTE B2OLD 'old meassure value orientation meassurement / alter Messwert Orientierungsmessung 2290 DEF INTE B2MESSV 'meassure value orientation meassurement / Messwert Orientierungsmessung
2300 DEF INTE MAXDEGR 'max turn angle orientation meassurement / max. Drehwinkel Orientierungsmessung 2310 DEF INTE CoSP 'Zähler silbener Kolben / counter silver pistons
2320 DEF INTE CoBP 'Zähler schwarzer Kolben / counter black pistons 2330 DEF INTE SFound 'Feder gefunden / spring found
2340 '
2350 DEF PLT 2,P5+VecCTPB,P5+VecCTPB+VECEP2,P5+VecCTPB+VECEP2,,5,1,2 'Palette 2,schwarze Kolben / 2360 'pallet 2, black pistons 2370 DEF PLT 1,P5+VecCTPS,P5+VecCTPS+VECEP1,P5+VecCTPS+VECEP1,,5,1,2 'Palette 1,silberne Kolben / 2380 'pallet 1, silver pistons 2390 '
2400 OVRD 50 2410 SLOW = 20 2420 SUSLOW = 15 2430 FAST = 60 2440 CoSP = 1 2450 CoBP = 1 2460 HOPEN 1 2470 SPD FAST 2480 IP_N_FO = 1 2490 '
2500 *MAINLOOP 'mainloop / Hauptschleife 2510 GOSUB *WPART
2520 GOSUB *GETCYL 2530 GOSUB *PLACECYL 2540 GOSUB *GETPIST 2550 GOSUB *ASSPIST 2560 GOSUB *GETSPRG 2570 GOSUB *ASSSPRG 2580 GOSUB *GETCOVER 2590 GOSUB *ASSCOVER 2600 GOSUB *DEPRYPRT 2610 GOTO *MAINLOOP 2620 END
2630 ' 2640 *ErrL 2650 HLT 2660 ' 2670 '
2680 '--- 2690 '| *WPart (Unterprogramm/Subroutine) | 2700 '| Positionen/positions | 2710 '| Eingangsgeschwindigkeit/speed of entrance : | 2720 '| Eingangsvariablen /variables of entrance : - | 2730 '--- 2740 '| Für 3 Sekunden auf Werkstück am Stationseingang | 2750 '| warten,nach Ablauf der Zeit muss Werkstück noch | 2760 '| vorhanden sein, sonst für weitere 3 Sekunden warten | 2770 '| Waiting for 3 sec. for a workpiece at the material | 2780 '| interchange point. After the expirence of the 3 sec. | 2790 '| the workpiece must be still present otherwise wait | 2800 '| 3 more sec. | 2810 '--- 2820 *WPART
2830 IF PART_AV = 0 THEN *WPART 2840 DLY 3
2850 IF PART_AV = 0 THEN *WPART 2860 IP_N_FO = 1
2870 RETURN 2880 '
2890 '--- 2900 '| *GETCYL (Unterprogramm/Subroutine) | 2910 '| Positionen/positions P1 | 2920 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 2930 '| Eingangsvariablen /variables of entrance : - | 2940 '--- 2950 '| Werkstück mit dem Außengreifer vom Material- | 2960 '| eingang abholen | 2970 '| Get workpiece with the auter gripper | 2980 '--- 2990 *GETCYL
3000 MOV P1+VECZ200 3010 AUXPOS = P1+VECZ50 3020 MOV AUXPOS
3030 SPD SLOW
3040 MVS AUXPOS - VECZ50 3050 HCLOSE 1
3060 DLY 1
3070 MVS AUXPOS 3080 SPD FAST
3090 MOV P1+VECZ200 3100 RETURN
3110 '
3120 '--- --- 3130 '| *PLACECYL (Unterprogramm/Subroutine) | | *TestOr (Unterprogramm/Subroutine) | 3140 '| Positionen/positions P2 ,P3 | | Positionen/positions | 3150 '| Eingangsgeschwindigkeit/speed of entrance : Fast | | Eingangsgeschwindigkeit/speed of entrance : Slow | 3160 '| Eingangsvariablen /variables of entrance : CylType | | Eingangsvariablen /variables of entrance : | 3170 '--- --- 3180 '| Werkstück auf der Umgreifposition des Montagemoduls | | Ermittlung der Orientierung. Es wird die positive | 3190 '| ablegen, die Teileart ermitteln, Orientierung er- | | Flanke erkannt. Bei Winkeln über 140 Grad bleibt | 3200 '| mitteln und auf der Montageposition ablegen | | das Programm stehen | 3210 '| Deposit the workpiece at the regrip position, | | Identification of the orientation. The positive | 3220 '| identify the materialtyp, orientation and deposit | | Edge is dedected. If the angle is bigger then 140 | 3230 '| at the assembly position | | degree the program will be stopped | 3240 '--- --- 3250 *PlaceCyl
3260 AuxPos = VecCUP+VecGA+VECZ50+P2 3270 MOV AuxPos + VecZ200
3280 MOV AUXPOS
3290 MVS AUXPOS - VECZ50 3300 HOPEN 1
3310 MVS AUXPOS
3320 AUXPOS = P3 + VECZ50 3330 MOV AUXPOS
3340 MOV P3 3350 DLY 1
3360 CYLTYPE = B1 3370 MOV AUXPOS
3380 IF CYLTYPE = 0 THEN *BLACK1 ELSE *NBLACK1 3390 *BLACK1
3400 AUXPOS = VECZ50-VECZ2+VecCUP+P2 3410 GOTO *CONT1
3420 *NBLACK1
3430 AUXPOS = VECZ50+VecCUP+P2 3440 *CONT1
3450 MOV AUXPOS 3460 SPD SLOW
3470 MVS AUXPOS - VECZ50 3480 HCLOSE 1
3490 DLY 1 3500 MVS AUXPOS 3510 SPD FAST
3520 AUXPOS = AuxPos - VecCUP + VecCOZ 3530 MOV AUXPOS
3540 SPD SLOW
3550 AUXPOS = AUXPOS - VECZ50 3560 MVS AUXPOS
3570 GOSUB *TESTOR
3580 AUXPOS = AUXPOS+ VECZ50 3590 MVS AUXPOS
3600 AUXPOS= AuxPos+VECCOM+VECCACYL 3610 MOV AUXPOS
3620 MVS AUXPOS-VECZ50 3630 HOPEN 1
3640 MVS AUXPOS 3650 SPD FAST
3660 MOV AUXPOS + VECZ200 3670 RETURN
3680 '
3690 '--- 3700 '| *GETPIST (Unterprogramm/Subroutine) | 3710 '| Positionen/positions P5 | 3720 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 3730 '| Eingangsvariablen /variables of entrance : PLT 1,2 | 3740 '--- 3750 '| Abholung eines Kolbens aus der Palette. Es wird | 3760 '| nicht überprüft, ob das Teil vorhanden ist. | 3770 '| Getting the piston out of the pallet. It is not | 3780 '| tested if a part is available | 3790 '--- 3800 *GETPIST
3810 IF CYLTYPE = 0 THEN *BLACK2 ELSE *NBLACK2 3820 *BLACK2
3830 If CoBP < 5 Then *CONT21 3840 CoBP = 1
3850 *CONT21
3860 AUXPOS = PLT 1, CoBP 3870 CoBP = CoBP +1
3880 GOTO *CONT2 3890 *NBLACK2
3900 IF CoSP < 5 Then *CONT22 3910 CoSP = 1
3920 *CONT22
3930 AUXPOS = PLT 2, CoSP 3940 CoSP = CoSP +1
3950 *CONT2
3960 MOV P5 + VecZ100 3970 MVS AuxPos + VecZ50 3980 SPD Slow
3990 MVS AuxPos
4000 HCLOSE 1 4010 DLY 1
4020 MVS AuxPos + VecZ50 4030 SPD Fast
4040 MOV AuxPos + VecZ100 4050 MOV P5 + VecZ100 4060 RETURN
4070 '
4080 '--- 4090 '| *ASSPIST (Unterprogramm/Subroutine) | 4100 '| Positionen/positions P2 | 4110 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 4120 '| Eingangsvariablen /variables of entrance : CYLTYPE | 4130 '--- 4140 '| Ablegen des Kolbens im Zylinder | 4150 '| Deposition of the piston in the cylinder | 4160 '--- 4170 *ASSPIST
4180 SPD Fast
4190 MOV VECZ200+P2
4200 AuxPos = VecCMPPS+VECZ50+P2 4210 MOV AuxPos
4220 IF CYLTYPE = 1 THEN *NBLACK3 4230 AUXPOS = AuxPos-VECZ2
4240 *NBLACK3 4250 MOV AUXPOS 4260 SPD SLOW
4270 MVS AUXPOS - VECZ50 4280 HOPEN 1
4290 MVS AUXPOS 4300 SPD FAST 4310 RETURN 4320 '
4330 '--- 4340 '| *GETSPRG (Unterprogramm/Subroutine) | 4350 '| Positionen/positions P8, P4 | 4360 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 4370 '| Eingangsvariablen /variables of entrance : | 4380 '--- 4390 '| Abholung der Feder aus dem Federmagazin. | 4400 '| Zum Erkennen der Feder fährt der Greifer mit dem | 4410 '| Sensor zyklisch 3 mal in 0.5 mm Abständen an die | 4420 '| Aholstelle vorbei bis eine Feder vorhanden ist | 4430 '| Getting the spring out of the magazine | 4440 '| for identification of the spring the gripper is | 4450 '| cyclely moveing the sensor 3 times with 0.5 mm | 4460 '| steps at the interchange point until a spring is | 4470 '| present. | 4480 '--- 4490 *GETSPRG
4500 SFound = 0 4510 MOV P8+ VECZ50 4520 MOV P8
4530 ACT 1=1 4540 SPD 2 4550 *NFOUND4
4560 MVS P8 + VECZINT
4570 IF SFound = 1 THEN *FOUND4 4580 MVS P8 - VECZINT
4590 IF SFound = 1 THEN *FOUND4 4600 GOTO *NFOUND4
4610 *FOUND4 4620 SPD Fast
4660 SPD SLOW
4670 MVS AUXPOS - VECZ50 4680 HCLOSE 1
4690 DLY 1
4700 MVS AUXPOS 4710 SPD FAST 4720 RETURN 4730 ' 4740 *INTR 4750 SFound = 1 4760 RETURN 1 4770 '
4780 '--- 4790 '| *ASSSPRG (Unterprogramm/Subroutine) | 4800 '| Positionen/positions P2 | 4810 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 4820 '| Eingangsvariablen /variables of entrance : CYLTYPE | 4830 '--- 4840 '| Ablegen der Feder im Zylinder | 4850 '| Deposition of the spring in the cylinder | 4860 '--- 4870 *ASSSPRG
4880 AuxPos = VecCMPPS+VECZ50+P2 4890 IF CYLTYPE = 1 THEN *NBLACK5 4900 AUXPOS = AuxPos-VECZ2
4910 *NBlack5 4920 MOV AUXPOS 4930 SPD SLOW
4940 MVS AUXPOS - VECZ50 4950 HOPEN 1
4960 MVS AUXPOS 4970 SPD FAST
4980 AuxPos = AuxPos + VECZ100 4990 MOV AuxPos
5000 RETURN 5010 '
5020 '--- 5030 '| *GETCOVER (Unterprogramm/Subroutine) | 5040 '| Positionen/positions P7, P9 | 5050 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 5060 '| Eingangsvariablen /variables of entrance : | 5070 '--- 5080 '| Deckel aus dem Deckelmagazin abholen. Der Greifer | 5090 '| wartet auf das Teil. | 5100 '| Getting the cover out of the magazine. The gripper | 5110 '| is waiting for a workpiece | 5120 '--- 5130 '
5140 *GETCOVER
5150 AuxPos = P7 + VECZ50 5160 MOV AuxPos
5170 SPD Slow
5180 MVS AuxPos-VecZ50 5190 *WAIT6
5200 DLY 1
5210 IF B1 = 0 THEN *WAIT6 5220 MVS AuxPos
5230 AUXPOS = P9 + VECZ50 5240 MOV AUXPOS
5250 SPD Slow
5260 MVS AuxPos - VecZ50 5270 HCLOSE 1
5280 DLY 1 5290 MVS AuxPos 5300 SPD Fast
5310 MOV P9 + VECZ200
5320 MOV P9 + VECZ200 - VECY50
5330 AUXPOS = VECZ100+VECCOD+VecGA+P2 5340 MOV AuxPos
5350 AuxPos = AuxPos - VecZ50 5360 SPD Slow
5370 MOV AuxPos
5380 MVS AuxPos - VecZ50 5390 HOPEN 1
5400 MOV AuxPos 5410 SPD Fast 5420 RETURN 5430 '
5440 '--- --- 5450 '| *ASSCOVER (Unterprogramm/Subroutine) | | *TestOr (Unterprogramm/Subroutine) | 5460 '| Positionen/positions P2 | | Positionen/positions | 5470 '| Eingangsgeschwindigkeit/speed of entrance : Fast | | Eingangsgeschwindigkeit/speed of entrance : Slow | 5480 '| Eingangsvariablen /variables of entrance : CylType | | Eingangsvariablen /variables of entrance : | 5490 '--- --- 5500 '| Orientierung des Deckels mit anschließender Montage | | Ermittlung der Orientierung. Es wird die positive | 5510 '| Orientation of the cover and assembly | | Flanke erkannt. Bei Winkeln über 140 Grad bleibt | 5520 '| | | das Programm stehen | 5530 '| | | Identification of the orientation. The positive | 5540 '| | | Edge is dedected. If the angle is bigger then 140 | 5550 '| | | degree the program will be stopped | 5560 '--- --- 5570 *ASSCOVER
5580 AUXPOS = VECZ50+VECCOD+P2 5590 MOV AUXPOS
5600 SPD SLOW
5610 AUXPOS =AUXPOS-VECZ50 5620 MVS AUXPOS
5630 HCLOSE 1 5640 DLY 1
5650 GOSUB *TESTOR 5660 MVS AUXPOS+VECZ50
5670 AuxPos = AuxPos+VecCOC+VecCACov+VecZ50 5680 IF CYLTYPE = 1 THEN *NBLACK7
5690 AUXPOS = AUXPOS-VECZ2 5700 *NBLACK7
5710 MOV AUXPOS 5720 SPD SLOW
5730 MVS AUXPOS - VECZ50 5740 SPD SUSLOW
5750 MVS AUXPOS - VECZ50 + VECT30 5760 SPD SLOW
5770 HOPEN 1
5780 MVS AUXPOS + VECT30 5790 MVS AUXPOS
5800 SPD FAST 5810 RETURN 5820 '
5830 '--- 5840 '| *DEPRYPRT (Unterprogramm/Subroutine) | 5850 '| Positionen/positions P2, P6 | 5860 '| Eingangsgeschwindigkeit/speed of entrance : Fast | 5870 '| Eingangsvariablen /variables of entrance : | 5880 '--- 5890 '| Ferig montiertes Teil aus der Montageposition | 5900 '| abholen und auf der Rutsche ablegen. | 5910 '| Getting the assembled part from the assemly position | 5920 '| and deposition at the slide | 5930 '--- 5940 '
5950 *DEPRYPRT 5960 *WAIT8
5970 IF IP_FI = 0 THEN *WAIT8 5980 SPD SLOW
5990 AUXPOS = VecCMPZ+VECZ50+P2 6000 MOV AUXPOS
6010 MVS AUXPOS - VECZ50 6020 HCLOSE 1
6030 DLY 1
6040 MVS AUXPOS - VECZ50 6050 MVS AUXPOS
6060 SPD FAST
6070 AUXPOS = P6 - VECY50 6080 MOV AUXPOS
6090 MVS P6 6100 HOPEN 1 6110 MVS AUXPOS 6120 MOV P99 6130 IP_N_FO = 0 6140 RETURN 6150'
6160 '--- 6170 '| *TestOr (Unterprogramm/Subroutine) | 6180 '| Positionen/positions | 6190 '| Eingangsgeschwindigkeit/speed of entrance : Slow | 6200 '| Eingangsvariablen /variables of entrance : | 6210 '--- 6220 '| Ermittlung der Orientierung. Es wird die positive | 6230 '| Flanke erkannt. Bei Winkeln über 140 Grad bleibt | 6240 '| das Programm stehen | 6250 '| Identification of the orientation. The positive | 6260 '| Edge is dedected. If the angle is bigger then 140 | 6270 '| degree the program will be stopped | 6280 '--- 6290 *TESTOR
6300 B2OLD = 0 6310 MAXDEGR = 0 6320 DLY 0.5 6330 *NFOUND9 6340 B2MESSV = B2
6350 IF B2MESSV = 1 AND MAXDEGR = 0 THEN *LABEL9 6360 IF B2MESSV = 1 AND B2OLD = 0 THEN *FOUND9 6370 *LABEL9
6380 AUXPOS = AUXPOS + VECMINC 6390 MVS AUXPOS
6400 B2OLD = B2MESSV
6410 IF MAXDEGR > 140 THEN *ErrL 6420 MAXDEGR = MAXDEGR +1
6430 GOTO *NFOUND9 6440 *FOUND9
6450 RETURN
POSITIONEN / POSITIONS
P1 = ( 251.66, 53.27, 165.80, -51.86, 179.98, 0.00, 0.00, 0.00) 'Rotes Werkstück greifen / Pick up red workpiece
P2 = ( 217.05, 202.19, 163.42, 0.12, 179.94, 0.00, 0.00, 0.00) 'Referenzpunkt Modul Montageaufnahme / 'Reference point Assembly retainer module P3 = ( 187.70, 219.73, 141.43, 1.08, 180.61, 0.00, 0.00, 0.00) 'Identifikation (Farberkennung) /
'Identification (colour of workpiece) P4 = ( 223.96, 245.14, 145.09, -73.24, 180.52, 0.00, 0.00, 0.00) 'Feder greifen / Pick up spring
P5 = ( -142.85, 271.79, 145.22, -0.25, 180.68, 0.00, 0.00, 0.00) 'Referenzpunkt Modul Palette / 'Reference point Palett module P6 = ( 142.01, 313.19, 343.36, 90.40, 180.74, 0.00, 0.00, 0.00) 'Werkstück auf Rutsche ablegen / 'Place workpiece at slide
P7 = ( 72.30, 274.54, 145.10, -180.87, 179.98, 0.00, 0.00, 0.00) 'Deckel vorhanden / Cover available P8 = ( 203.61, 255.92, 144.38, -85.62, 180.11, 0.00, 0.00, 0.00) 'Feder vorhanden / Spring available P9 = ( 35.97, 277.01, 148.50, 89.20, 180.78, 0.00, 0.00, 0.00) 'Deckel greifen / Pick up covers P99= ( 240.63, 7.35, 372.23, 1.40, 180.74, 0.00, 0.00, 0.00) 'Grundposition / Initial position