computational design + fabrication: cncinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf ·...

28
Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September 4, 2015

Upload: ngodan

Post on 30-Nov-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Computational Design + Fabrication: CNC

Jonathan Bachrach

EECS UC Berkeley

September 4, 2015

Page 2: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

CNC 1

ComputerizedNumericControl

Page 3: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Benefits 2

AutomationPrecisionRepeatabilityFlexibility

Page 4: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Examples 3

CuttersMills3D PrintersLathesKnitting

stoll cnc knitting machine

Page 5: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

CNC History 4

John T Parsons + MIT 1949

Page 6: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Categories 5

AdditiveSubtractive

additive subtractive

Page 7: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Axes 6

How Many?1D2D2.5D3D5Dlinear

What Kind?rotarylinear

Page 8: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Workspace 7

how bigshapeconstraints

by xiyang yeh @ stanford

Page 9: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Feedrate 8

how fast to do cutup to speed of breaking end millmore but slower cuts

Page 10: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Feedback 9

open loopcrash

closed looplimit switchrotary encodercamera

Page 11: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Kerf 10

width of saw bladecut radiusmust compensate in code

by parts express

Page 12: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Undercut 11

extra cut to compensate for mill radius

by wizard191

Page 13: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Lead-ins + Lead-outs 12

extra cut during start or finish of cutusually need to plan for this

by big blue saw

Page 14: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Coordinate 13

RectangularPrecision – incrementsOrigin – ZeroingAbsolute and Relative

Page 15: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Tool Changing 14

different cuttersthicker mill cuts faster but less preciseswitch between them under program control

Page 16: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

GCode 15

word addressed format for programmingsentence like commands: letter followed by numeric argumentcommand is made up of words often one letter with intuitiveinterpretationsstep by step commandsread interpret execute each command

X10

Y20

Page 17: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Example Commands 16

O Program number (Used for program identification)N Sequence number (Used for line identification)G Preparatory function (See below)X X-axis designationY Y-axis designationZ Z-axis designationR Radius designationF Feedrate designationS Spindle speed designationH Tool length offset designationD Tool radius offset designationT Tool DesignationM Miscellaneous function

Page 18: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Example GCode Program 17

G1 X5 Y-5 Z6 F3300.0 (Move to postion <x,y,z>=<5,-5,6> at speed 3300.0)

G21 (set units to mm)

G90 (set positioning to absolute)

G92 X0 Y0 Z0 (set current position to <x,y,z>=<0,0,0>)

Page 19: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Manufacturer Specific Commands 18

G90, G91spindle speedcoolanttool changing

Page 20: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Programming 19

like turtle graphicsmovepen up/down

no loopsno subroutines

Page 21: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

GCode Processing 20

send gcode to CNC machinemachine interprets one command at a timeusually microcontroller which is interpreting and executing

tinyg microcontroller board

Page 22: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Path Planning 21

organize cuts efficientlyplan motions according to dynamicschange speedsbang-bang control

Page 23: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Ordering of Cuts 22

need to plan cuts so parts are cut correctlycut holes out firstmuch more involved for 5 axis machines

by customlasercutters

Page 24: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Traveling Saleman Problem 23

salesman has to visit n city in minimum time

GLPK solution by xypron

Page 25: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Simulation 24

show planned out motionsactually interpret gcodevalidate that plan works

by modern machine shop

Page 26: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Visualization 25

show feedback during executioncommunicate to user for manual interventionWYSIWYG

by othermachine co

Page 27: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

Input Formats 26

DXF,SVG,PDF – polylinesSTL,OBJ – meshesAMF – materials, frep

solid name

facet normal ni nj nk

outer loop

vertex v1x v1y v1z

vertex v2x v2y v2z

vertex v3x v3y v3z

endloop

endfacet

endsolide name

Page 28: Computational Design + Fabrication: CNCinst.eecs.berkeley.edu/~cs194-28/fa15/lectures/cnc.pdf · Computational Design + Fabrication: CNC Jonathan Bachrach EECS UC Berkeley September

References 27

AMF – http://www.astm.org/Standards/ISOASTM52915.htm