การพิมพ์ 3 มิติหรือการเพิ่มกระบวนการผลิตเป็นขั้นตอนของการสร้างสิ่งของแข็ง 3 มิติจากไฟล์ดิจิตอล แขนหุ่นยนต์อุตสาหกรรมสามารถถูกใช้เครื่องพิมพ์ 3 มิติ 3 แกนหรือ 5 แกน 3 มิติสำหรับRoboDK วีดีโอดังกล่าวแสดงในภาพรวมของวิธีตั้งค่าเครื่องพิมพ์ 3 มิติด้วย RoboDK ออฟไลน์: watch video.
เครื่องพิมพ์ 3 มิติด้วยหุ่นยนต์เป็นหนึ่งในหลายวิธีต่อไปนี้:
●แปลงโปรแกรม G-code โดยตรง (ไฟล์NC) ถึงโปรแกรมหุ่นยนต์ด้วย RoboDK, ซึ่งแสดงโดยRobot Machining project. อัตราของการไหลวัตถุ(คำสั่งเครื่องอัดรัด E) ได้ถูกนำลงบัญชีอย่างเหมาะสมสำหรับแต่ละการเคลื่อนที่และมันสามารถรวมกันในโปรแกรมที่สร้างขึ้นเป็นProgram Event. G-code เป็นชนิดของไฟล์ NC ที่ถูกสนับสนุนโดย RoboDK และมันยังเป็นรูปแบบทีถูกสนับสนุนโดยเครื่องพิมพ์ 3 มิติ ซอฟต์แวร์เครื่องตัดส่วนใหญ่สามารถสร้าง G-code ที่ให้มาในไฟล์ STL
●เลือกUtilities➔3D Print Projectเพื่อเปิดการตั้งค่าเครื่องพิมพ์ 3 มิติการตั้งค่าเหล่านี้เป็นสิ่งที่เหมือนกับRobot Machining Project, ความแตกต่างเฉพาะคือPath inputการตั้งค่าล่วงหน้า3D print object. เลือกSelect objectเพื่อเลือกวัตถุบนหน้าจอหลักและรับเส้นทางเครื่องมืออย่างอัตโนมัติเลือกเครื่องพิมพ์ 3 มิติเพื่อเปิด Slic3r.


ค่าเริ่มต้น, RoboDK แปลคำสั่งการเรียกโปรแกรม E เป็นโปรแกรมที่เรียกว่าExtruderและให้ค่า E value เป็นค่าพารามิเตอร์เลือกProgram Eventsเพื่อเปลี่ยนลักษณะดังกล่าว

ค่าเครื่องอัดรีด (E) เป็นตัวแทนที่แสดงว่าวัตถุดิบที่จำเป็นต้องอัดรีดก่อนการเคลื่อนที่ ค่านี้สามารถถูกขับเคลื่อนการป้อนเครื่องอัดรีดจากหุ่นยนต์ลงในบัญชีความเร็วหุ่นยนต์และระยะทางระหว่างจุด
อีกทางเลือกหนึ่ง, มันยังสามารถคำนวณการป้อนเครื่องอัดรีดโดยการใช้หน่วยประมวลผลและสร้างโค้ดที่เหมาะสมตามลำดับ ส่วนต่อไปนี้มีตัวอย่างแสดง
ในส่วนนี้แสดงการดัดแปลงหุ่นยนต์post processorเพื่อคำนวณการป้อนเครื่องอัดรัดก่อนการดำเนินการแต่ละการเคลื่อนที่ อีกทางเลือกหนึ่ง, การคำนวณเหล่านี้สามารถถูกทำได้บนหุ่นยนต์ควบคุม
ในขั้นตอนแรกที่จะขัดขวางการเรียกเครื่องอัดรีดและการอ่านค่าเครื่องอัดรีด (ค่า E) จากส่วนของ RunCode ในหน่วยประมวลผล:
def RunCode(self, code, is_function_call = False):
if is_function_call:
if code.startswith("Extruder("):
# Intercept the extruder command.
# if the program call is Extruder(123.56)
# we extract the number as a string
# and convert it to a number
self.PRINT_E_NEW = float(code[9:-1])
# Skip the program call generation
return
else:
self.addline(code + "()")
else:
# Output program code
self.addline(code)
ค่าเครื่องอัดฉีดถูกบันทึกตัวแปร NEW_E_LENGTH จากนั้น, เราจำเป็นต้องกำหนดขั้นตอนใหม่ซึ่งจะสร้างคำสั่งการป้อนค่าเครื่องอัดรีดอย่างเหมาะสมตามระยะทางระหว่างการเคลื่อนที่,ความเร็วของหุ่นยนต์และความเร่งของหุ่นยนต์ สามารถประมาณได้ว่าการป้อนเครื่องอัดรีดถูกขับเคลื่อนด้วยผลลัพธ์อนาล็อกเฉพาะจากหุ่นยนต์ควบคุม (ตัวเลขผลลัพธ์อนาล็อก 5 ในตัวอย่างนี้)
def MoveL(self, pose, joints, conf_RLF=None):
"""Add a linear movement"""
# Handle 3D printing Extruder integration
self.new_move(pose)
...
# 3D Printing Extruder Setup Parameters:
PRINT_E_AO = 5 # Analog Output ID to command the extruder flow
PRINT_SPEED_2_SIGNAL = 0.10 # Ratio to convert the speed/flow to an analog output signal
PRINT_FLOW_MAX_SIGNAL = 24 # Maximum signal to provide to the Extruder
PRINT_ACCEL_MMSS = -1 # Acceleration, -1 assumes constant speed if we use rounding/blending
# Internal 3D Printing Parameters
PRINT_POSE_LAST = None # Last pose printed
PRINT_E_LAST = 0 # Last Extruder length
PRINT_E_NEW = None # New Extruder Length
PRINT_LAST_SIGNAL = None # Last extruder signal
def calculate_time(self, distance, Vmax, Amax=-1):
"""Calculate the time to move a distance with Amax acceleration and Vmax speed"""
if Amax < 0:
# Assume constant speed (appropriate smoothing/rounding parameter must be set)
Ttot = distance/Vmax
else:
# Assume we accelerate and decelerate
tacc = Vmax/Amax;
Xacc = 0.5*Amax*tacc*tacc;
if distance <= 2*Xacc:
# Vmax is not reached
tacc = sqrt(distance/Amax)
Ttot = tacc*2
สุดท้าย, พวกเราจำเป็นต้องกระตุ้นคำสั่ง new_move ของแต่ละคำแนะนำการเคลื่อนที่ใหม่ พวกเราสามารถเพิ่มกาเรียกนี้ตั้งแต่เริ่มต้นของคำสั่ง MoveL:
else:
# Vmax is reached
Xvmax = distance - 2*Xacc
Tvmax = Xvmax/Vmax
Ttot = 2*tacc + Tvmax
return Ttot
def new_move(self, new_pose):
"""Implement the action on the extruder for 3D printing, if applicable"""
if self.PRINT_E_NEW isNone or new_pose is None:
return
# Skip the first move and remember the pose
if self.PRINT_POSE_LAST isNone:
self.PRINT_POSE_LAST = new_pose
return
# Calculate the increase of material for the next movement
add_material = self.PRINT_E_NEW - self.PRINT_E_LAST
self.PRINT_E_LAST = self.PRINT_E_NEW
# Calculate the robot speed and Extruder signal
extruder_signal = 0
if add_material > 0:
distance_mm = norm(subs3(self.PRINT_POSE_LAST.Pos(), new_pose.Pos()))
# Calculate movement time in seconds
time_s = self.calculate_time(distance_mm, self.SPEED_MMS, self.PRINT_ACCEL_MMSS)
# Avoid division by 0
if time_s > 0:
# This may look redundant but it allows you to account for accelerations and we can apply small speed adjustments
speed_mms = distance_mm / time_s
# Calculate the extruder speed in RPM*Ratio (PRINT_SPEED_2_SIGNAL)
extruder_signal = speed_mms * self.PRINT_SPEED_2_SIGNAL
# Make sure the signal is within the accepted values
extruder_signal = max(0,min(self.PRINT_FLOW_MAX_SIGNAL, extruder_signal))
# Update the extruder speed when required
if self.PRINT_LAST_SIGNAL isNone or abs(extruder_signal - self.PRINT_LAST_SIGNAL) > 1e-6:
self.PRINT_LAST_SIGNAL = extruder_signal
# Use the built-in setDO function to set an analog output
self.setDO(self.PRINT_E_AO, "%.3f" % extruder_signal)
# Alternatively, provoke a program call and handle the integration with the robot controller
#self.addline('ExtruderSpeed(%.3f)' % extruder_signal)
# Remember the last pose
self.PRINT_POSE_LAST = new_pose