Servus erstmal.
Ich habe folgende Frage:
Ich soll einige Werkstücke mit einem Plasmaschneider aus einer Metalplatte schneiden. Diese 4 Werkstücke sollen insgesamt 3 mal geschnitten werden (also insgesamt am Ende 12 Stück).
Erstmal mein bisheriges Script:
DEF Werkstuecke ()
INI
PTP Home
PTP {Z 5}
Schirm hoch
Wait sec 1
PTP_rel {y 1200}
Viereck ()
PTP_rel {x 700; y -10}
Viereck ()
PTP Home
PTP_rel {y 700}
Trapez ()
PTP_rel {x 710; y -10}
Trapez2 ()
DEF Viereck ()
Zuenden
Wait Sec 1
PTP {z 2}
lin_rel {x 600}
lin_rel {y -400}
lin_rel {x -600}
lin_rel {y 410}
PTP {z 5}
Plasma aus
Wait Sec 1
END
DEF Trapez ()
Zuenden
Wait Sec 1
PTP {z 2}
lin_rel {x 600}
lin_rel {y -700}
lin_rel {x -300}
lin_rel {x -610 y 710}
PTP {z 5}
Plasma aus
Wait Sec 1
END
DEF Trapez2 ()
Zuenden
Wait Sec 1
PTP {z 2}
lin_rel {x 600}
lin_rel {x -300; y -700}
lin_rel {x -300}
lin_rel {y 710}
PTP {z 5}
Plasma aus
Wait Sec 1
END
(Ich hab für Plasma erstmal nur Zuenden und Plasma aus angegeben, das ist Absicht also nicht drüber meckern )
Nun kann ich ja theoretisch einfach diese ganzen Schritte nur immer jeweils versetzt kopieren. Also quasi so:
DEF Werkstuecke ()
....
PTP Home
PTP_rel {x 1600}
PTP_rel {y 1200}
Viereck ()
PTP_rel {x 700; y -10}
Viereck ()
PTP Home
PTP_rel {y 700}
Trapez1 ()
PTP_rel {x 710; y -10}
Trapez2 ()
PTP_rel {x 900; y -710}
PTP_rel {y 1200}
Viereck ()
PTP_rel {x 700; y -10}
Viereck ()
PTP Home
PTP_rel {y 700}
Trapez1 ()
PTP_rel {x 710; y -10}
Trapez2 ()
PTP Home
Aber gibt es da nicht nen leichteren Weg oder muss man das nochmal jetzt quasi alles kopieren?
Hoffe auf schnelle Antwort und danke im vorraus