|
|
|
|
@ -38,8 +38,8 @@ class Kuka_Prog:
@@ -38,8 +38,8 @@ class Kuka_Prog:
|
|
|
|
|
self.laser_out = 3 |
|
|
|
|
self.laser_pilot_out = 4 # default is pilot laser |
|
|
|
|
self.use_laser_out = self.laser_pilot_out |
|
|
|
|
self.inert_gas_out = 9 |
|
|
|
|
self.powder_out = 7 |
|
|
|
|
self.inert_gas_out = 7 # gas |
|
|
|
|
self.powder_out = 8 # first powder pot |
|
|
|
|
self.simulation = True |
|
|
|
|
self.label = "REPLACEME" |
|
|
|
|
|
|
|
|
|
@ -59,6 +59,12 @@ class Kuka_Prog:
@@ -59,6 +59,12 @@ class Kuka_Prog:
|
|
|
|
|
def set_laser_power(self, power): |
|
|
|
|
self.laser_power = power |
|
|
|
|
|
|
|
|
|
def set_powder_out(self, powder): |
|
|
|
|
self.powder_out = powder |
|
|
|
|
|
|
|
|
|
def set_inert_gas_out(self, inert_gas): |
|
|
|
|
self.inert_gas_out = inert_gas |
|
|
|
|
|
|
|
|
|
def set_laser_out(self, laser_output): |
|
|
|
|
self.laser_out = laser_output |
|
|
|
|
|
|
|
|
|
@ -171,18 +177,18 @@ class Kuka_Prog:
@@ -171,18 +177,18 @@ class Kuka_Prog:
|
|
|
|
|
f.write(";- Hatchline\n") |
|
|
|
|
segment = line[0] |
|
|
|
|
f.write("$VEL.CP = %f ; m/s ; m/s \n" % self.vmax) |
|
|
|
|
f.write("LIN {}:{} C_VEL; move to first hatch point but with z_up\n".format(segment.translate_with(self.baseorigin).to_string(), z_up_pose)) |
|
|
|
|
f.write("LIN refpose:{}:{} C_VEL; move to first hatch point but with z_up\n".format(segment.translate_with(self.baseorigin).to_string(), z_up_pose)) |
|
|
|
|
# One Hatchline |
|
|
|
|
f.write(";- First Point in line \n") |
|
|
|
|
f.write("LIN {} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
f.write("LIN refpose:{} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
f.write("TRIGGER WHEN DISTANCE=0 DELAY=0 DO $OUT[%d]=True; Turn on Laser at point \n" % self.use_laser_out) |
|
|
|
|
# each segment |
|
|
|
|
for segment in line[1:-1]: |
|
|
|
|
f.write("$VEL.CP = %f ; m/s ; m/s \n" % self.vproc) |
|
|
|
|
f.write("LIN {} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
f.write("LIN refpose:{} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
segment = line[-1] |
|
|
|
|
f.write(";- Last Point in line \n") |
|
|
|
|
f.write("LIN {} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
f.write("LIN refpose:{} C_VEL; GENERATED\n".format(segment.translate_with(self.baseorigin).to_string())) |
|
|
|
|
f.write("TRIGGER WHEN DISTANCE=0 DELAY=0 DO $OUT[%d]=FALSE; Turn off Laser at point\n" % self.use_laser_out) |
|
|
|
|
f.write(";- End line \n") |
|
|
|
|
|
|
|
|
|
|