02-16-2019, 09:59 PM
(This post was last modified: 02-19-2019, 01:36 AM by rakshithb174.
Edit Reason: Updated information
)
Hello,
I am working on a 3D printing project using ABB Robot. I have gone through the 3D printing documentation about how the post processor code can be modified to account for extrusion values. The documentation proposes analog output for extruder motor speed control. However, I am using Digital I/O of the IRC5 DeviceNet with some synchronization signals to achieve the material extrusion. I have already hooked up the necessary hardware and I know how to configure the I/O with ABB software.
I want to modify the post processor code (ABB_RAPID_IRC5.py) to include a specific set of commands around MoveL command ONLY when Extruder() function is called. So far, I have made the following changes:
When I make this modification, all MoveL commands are surrounded by the custom code lines like this:
However, I want these custom code lines to be inserted for specific MoveL commands that follow after Extruder() function call. For example, the following is the RAPID code generated by roboDK:
I want only the fist MoveL to be surrounded by the custom code lines and NOT the successive MoveL commands. Can anyone help me with modifying the post to achieve this?
PS: I am using an older version of ABB_RAPID_IRC5.py post file (not the new one where analog control is implemented; although I have access to that as well) since I need the exact E values from the slic3r ( not converted to ExtruderSpeed() function)
Any help will be appreciated!
I am working on a 3D printing project using ABB Robot. I have gone through the 3D printing documentation about how the post processor code can be modified to account for extrusion values. The documentation proposes analog output for extruder motor speed control. However, I am using Digital I/O of the IRC5 DeviceNet with some synchronization signals to achieve the material extrusion. I have already hooked up the necessary hardware and I know how to configure the I/O with ABB software.
I want to modify the post processor code (ABB_RAPID_IRC5.py) to include a specific set of commands around MoveL command ONLY when Extruder() function is called. So far, I have made the following changes:
Code:
def MoveL(self, pose, joints, conf_RLF=None):
"""Add a linear movement"""
target = ''
if pose is None:
target = 'CalcRobT([%s,%s],%s,\WObj:=%s)' % (angles_2_str(joints), extaxes_2_str(joints), self.TOOLDATA, self.WOBJDATA)
else:
# Filter small movements
#if self.LAST_POSE is not None and pose is not None:
# # Skip adding a new movement if the new position is the same as the last one
# if distance(pose.Pos(), self.LAST_POSE.Pos()) < 0.001 and pose_angle_between(pose, self.LAST_POSE) < 0.01:
# return
# Handle 3D printing Extruder integration
# self.new_move(pose) (disabled on purpose)
if conf_RLF is None:
conf_RLF = [0,0,0]
cf1 = 0
cf4 = 0
cf6 = 0
if joints is not None and len(joints) >= 6:
cf1 = math.floor(joints[0]/90.0)
cf4 = math.floor(joints[3]/90.0)
cf6 = math.floor(joints[5]/90.0)
[REAR, LOWERARM, FLIP] = conf_RLF
cfx = 4*REAR + 2*LOWERARM + FLIP
target = '[%s,[%i,%i,%i,%i],%s]' % (pose_2_str(pose), cf1, cf4, cf6,cfx, extaxes_2_str(joints))
if self.ARC_ON:
# ArcL p100, v100, seam1, weld5 \Weave:=weave1, z10, gun1;
self.addline('ArcL %s,%s,%s,%s,\Weave:=%s,%s,%s,\WObj:=%s;' % (target, self.SPEEDDATA, self.ARC_SEAMDATA, self.ARC_WELDDATA, self.ARC_WEAVEDATA, self.ZONEDATA, self.TOOLDATA, self.WOBJDATA))
elif self.CLAD_ON:
self.addline('CladL %s,%s,%s,%s,%s,\WObj:=%s;' % (target, self.SPEEDDATA, self.CLAD_DATA, self.ZONEDATA, self.TOOLDATA, self.WOBJDATA))
else:
self.addline('custom code line 1')
self.addline('custom code line 2')
self.addline('MoveL %s,%s,%s,%s,\WObj:=%s;' % (target, self.SPEEDDATA, self.ZONEDATA, self.TOOLDATA, self.WOBJDATA))
self.addline('custom code line 3')
When I make this modification, all MoveL commands are surrounded by the custom code lines like this:
Code:
custom code line 1
Custom code line 2
MoveL command
custom code line 3
However, I want these custom code lines to be inserted for specific MoveL commands that follow after Extruder() function call. For example, the following is the RAPID code generated by roboDK:
Code:
Extruder(-0.800);
MoveL [[80.484, 81.324, 5.000],[0.000000, 0.000000, -1.000000, 0.000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v35,z1,rdkTool,\WObj:=rdkWObj;
MoveL [[80.484, 81.324, 0.600],[0.000000, 0.000000, -1.000000, 0.000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v180,z1,rdkTool,\WObj:=rdkWObj;
MoveL [[80.484, 81.324, 0.600],[0.000000, 0.000000, -1.000000, 0.000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v180,z1,rdkTool,\WObj:=rdkWObj;
MoveL [[80.484, 81.324, 0.200],[0.000000, 0.000000, -1.000000, 0.000000],[-1,-1,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v180,z1,rdkTool,\WObj:=rdkWObj;
I want only the fist MoveL to be surrounded by the custom code lines and NOT the successive MoveL commands. Can anyone help me with modifying the post to achieve this?
PS: I am using an older version of ABB_RAPID_IRC5.py post file (not the new one where analog control is implemented; although I have access to that as well) since I need the exact E values from the slic3r ( not converted to ExtruderSpeed() function)
Any help will be appreciated!