Hello,
I was having a problem with the output from the Siemens Sinumerik post processor, which does not include a Z value if it has not changed, here is an example.
Z value no change:
I obtained the 'source' post processor from info@robodk.com, and revised the 'pose_2_str' function which produced:
Z Value forced every line:
Not a question, but I searched extensively before posting and could not find an answer.
In case anyone else needs to force a z-axis value, or I forget how to do it in 6 months...
Attached is python program that adds the Z value to gcode.
Talk to you soon,
Tony
I was having a problem with the output from the Siemens Sinumerik post processor, which does not include a Z value if it has not changed, here is an example.
Z value no change:
Code:
N26 G1 X158.585 Y99.391 Z295.351 A=180.000 B=0.000 C=-173.733 F30000.0
N27 G1 X158.528 Y98.895 A=180.000 B=0.000 C=-173.734 F30000.0
N28 G1 X158.470 Y98.400 A=180.000 B=0.000 C=-173.736 F30000.0
Z Value forced every line:
Code:
N26 G1 X158.585 Y99.391 Z472.948 A180.000 B0.000 C-173.733 F30000.0
N27 G1 X158.527 Y98.895 Z472.948 A180.000 B0.000 C-173.725 F30000.0
N28 G1 X158.470 Y98.400 Z472.948 A180.000 B0.000 C-173.717 F30000.0
In case anyone else needs to force a z-axis value, or I forget how to do it in 6 months...
Attached is python program that adds the Z value to gcode.
Talk to you soon,
Tony
Code:
def pose_2_str(self, pose, remember_last=False):
"""Prints a pose target"""
[x,y,z,a,b,c] = Pose_2_Staubli(pose)
x = x * self.MM_2_UNITS
y = y * self.MM_2_UNITS
z = z * self.MM_2_UNITS
G_LINE = 'X%.3f Y%.3f Z%.3f A%.3f B%.3f C%.3f' % (x,y,z,a,b,c)
return G_LINE