数控铣床编程实例 简单

数控铣床编程实例 简单,第1张

毛坯为70㎜×70㎜×18㎜板材,六面码敏已粗加工过,要求数控铣出如图2-23所示的槽,工件材料为45钢。

选择机床设备:根据零件图漏悉样要求,选用经济型数控铣床即可达到要求。故选用XKN7125型数控立式铣床。

选择刀具:现采用φ10㎜的平底立铣刀,定义为T01,并把该刀具的直径输入刀具参数表中。

确定切削用量:切削用量的具体数值应根据该机床性能、相关的手册并结合实际经验确定,详见加工程序

确定工件坐标系和对刀点:在XOY平面内确定以工件中心为工件原点,Z方向以工件表面为工件原点,建立工件坐标系,如图2-23所示。 采用手动对刀方法( *** 作与前面介绍的数控铣床对刀方法相同)把点O作为对刀点。

编写程序:按该机床规定的指令代码和程序段格式,把加工零件的全部工艺过程编写成程序清单。 考虑到加工图示的槽,深为4㎜,每次切深为2㎜,分二次加工完,则为编程方便,同时减少指令条数,可采用子程序。

该工件的加工程序如下(该程序用于XKN7125铣床):

N0010 G00 Z2 S800 T1 M03

N0020 X15 Y0 M08

N0030 G20 N01 P1.-2;调一次子程序,槽深为2㎜

N0040 G20 N01 P1.-4;再调一返模乎次子程序,槽深为4㎜

N0050 G01 Z2 M09

N0060 G00 X0 Y0 Z150

N0070 M02;主程序结束

N0010 G22 N01;子程序开始

N0020 G01 ZP1 F80

N0030 G03 X15 Y0 I-15 J0

N0040 G01 X20

N0050 G03 X20 YO I-20 J0

N0060 G41 G01 X25 Y15 ;左刀补铣四角倒圆的正方形

N0070 G03 X15 Y25 I-10 J0

N0080 G01 X-15

N0090 G03 X-25 Y15 I0 J-10

N0100 G01 Y-15

N0110 G03 X-15 Y-25 I10 J0

N0120 G01 X15

N0130 G03 X25 Y-15 I0 J10

N0140 G01 Y0

N0150 G40 G01 X15 Y0;左刀补取消

N0160 G24;主程序结束

g54g90g0x-250y250m3s800

g43h1z100z10

z-20

g1x-200y200f200

g2x0y0r200

g3x200y-200r200

g01x220y-200

z10

g1x250y200

g1x200y200

g2x0y0r200

g3x-200y-200r200

g0z10

m30

宏程序

椭圆加工(编程思路:以一小段让指直坦漏配线代替曲搜咐线)

例1 整椭圆轨迹线加工(假定加工深度为2mm)

方法一:已知椭圆的参数方X=acosθ Y=bsinθ

变量数学表达式

设定θ= #1(0°~ 360° )

那么 X= #2 = acos[#1]

Y= #3= bsin[#1]

程序

O0001

G90 G54 G00 X40 Y0S1000 M03

g43h1Z100

G00 Z3

G01 Z-0.5F100

#1=0

N99 #2=20*cos[#1];

#3=15*sin[#1];

G01 X#2 Y#3 F300

#1=#1+1

IF[#1LE360]GOTO99;

GOO Z50;

M30;

%

O0100

G17G40G49G80

G91G28Z0

( 5 )

G90G54G00X0Y0

G43H01Z50.S3500M03

G00X-33.673Y25.929Z50.M09

Z-3.268

G01Z-4.268F300

X-33.862Y25.6Z-4.579

X-34.078Y25.226Z-4.81

X-34.313Y24.82Z-4.952

X-34.557Y24.398Z-5.

X-34.775Y24.021F1000

Y24.775

X-34.339

X-34.557Y24.398

X-31.959Y22.897

X-37.5Y13.306

X-37.501Y13.305

X-37.775Y12.831

Y27.775

X-37.501

X-37.499

X-28.988

X-29.197Y27.5

X-29.198Y27.499

X-29.216Y27.476

X-29.435Y27.171

X-29.647Y26.861

X-29.85Y26.545

X-29.877Y26.501

X-31.959Y22.897

X-29.362Y21.396

X-37.499Y7.31

X-37.5Y7.309

X-40.775Y1.641

Y30.688

X-40.602Y30.775

X-37.624

X-37.622

X40.602

X40.775Y30.688

Y27.623

Y27.622

Y26.722

X37.775

Y25.669

X37.5Y26.034

X37.499Y26.035

X37.36Y26.22

X36.925Y26.755

X36.47Y27.274

X36.256Y27.5

Y27.501

X35.996Y27.775

X37.775

Y27.501

Y27.499

Y26.722

X40.775

Y-27.622

Y-27.624

Y-30.688

X40.602Y-30.775

X36.888

Y-27.775

X36.001

X36.26Y-27.5

X36.261Y-27.499

X36.474Y-27.275

X36.927Y-26.758

X37.361Y-26.223

X37.499Y-26.04

X37.5Y-26.039

X37.775Y-25.673

Y-27.5

Y-27.501

Y-27.775

X36.888

Y-30.775

X-40.602

X-40.775Y-30.688

Y-27.623

Y-27.622

Y-24.403

X-37.501

X-37.5

X-34.775

Y-24.031

X-36.487Y-21.064

X-34.345Y-24.775

X-34.775

Y-24.403

X-37.499

X-37.501

X-37.775

Y-12.836

X-37.5Y-13.311

X-37.499Y-13.312

X-30.004Y-26.292

X-29.768Y-26.675

X-29.52Y-27.05

X-29.26Y-27.416

X-29.197Y-27.499

X-29.196Y-27.5

X-28.988Y-27.775

X-37.775

Y-27.501

Y-27.5

Y-24.403

X-40.775

Y-1.641

X-37.5Y-7.311

Y-7.313

X-27.428Y-24.756

X-26.945Y-25.497

X-26.406Y-26.198

X-25.813Y-26.854

X-25.17Y-27.462

X-25.122Y-27.5

X-25.121Y-27.501

X-24.481Y-28.016

X-23.75Y-28.515

X-22.983Y-28.955

X-22.183Y-29.332

X-21.356Y-29.646

X-20.507Y-29.893

X-19.641Y-30.073

X-18.763Y-30.183

X-17.88Y-30.225

X21.892Y-30.226

X23.712Y-30.206

X24.803Y-30.116

X25.885Y-29.948

X26.953Y-29.702

X27.999Y-29.381

X29.02Y-28.985

X30.01Y-28.516

X30.964Y-27.978

X31.682Y-27.501

X31.684Y-27.5

X31.876Y-27.372

X32.742Y-26.702

X33.558Y-25.971

X34.32Y-25.184

X35.022Y-24.344

X35.663Y-23.456

X36.238Y-22.524

X36.744Y-21.553

X37.179Y-20.548

X37.5Y-19.631

Y-19.629

X37.541Y-19.514

X37.827Y-18.457

X38.036Y-17.382

X38.168Y-16.295

X38.221Y-15.201

X38.225Y14.754

X38.184Y16.136

X38.066Y17.202

X37.873Y18.257

X37.607Y19.296

X37.501Y19.614

X37.5Y19.616

X37.268Y20.314

X36.858Y21.305

X36.379Y22.265

X35.834Y23.189

X35.225Y24.072

X34.556Y24.911

X33.829Y25.7

X33.049Y26.436

X32.218Y27.115

X31.674Y27.499

X31.672Y27.5

X31.342Y27.734

X30.424Y28.289

X29.47Y28.779

X28.483Y29.2

X27.47Y29.551

X26.434Y29.829

X25.381Y30.034

X24.316Y30.164

X23.245Y30.219

X-17.88Y30.225

X-18.705Y30.188

X-19.525Y30.091

X-20.336Y29.934

X-21.134Y29.718

X-21.913Y29.443

X-22.669Y29.112

X-22.452Y28.662

X-23.212Y28.257

X-23.937Y27.792

X-24.321Y27.5

X-24.322Y27.499

X-24.622Y27.271

X-25.263Y26.696

X-25.856Y26.072

X-26.396Y25.402

X-26.881Y24.691

X-37.5Y6.31

X-37.501Y6.309

X-40.409Y1.274

X-40.584Y0.869

X-40.691Y0.44

X-40.727Y0.0

X-40.691Y-0.44

X-40.584Y-0.869

X-40.409Y-1.274

X-37.5Y-6.312

Y-6.313

X-26.998Y-24.5

X-26.496Y-25.265

X-25.931Y-25.985

X-25.306Y-26.654

X-24.626Y-27.267

X-24.32Y-27.499

X-24.318Y-27.501

X-23.897Y-27.82

X-23.122Y-28.309

X-22.309Y-28.729

X-21.463Y-29.079

X-20.591Y-29.355

X-19.697Y-29.555

X-18.79Y-29.679

X-17.876Y-29.725

X21.892Y-29.726

X23.689Y-29.706

X24.744Y-29.619

X25.791Y-29.457

X26.823Y-29.22

X27.835Y-28.908

X28.823Y-28.525

X29.78Y-28.072

X30.702Y-27.551

X30.778Y-27.501

X30.78Y-27.5

X31.585Y-26.965

X32.423Y-26.318

X33.212Y-25.611

X33.948Y-24.85

X34.628Y-24.037

X35.247Y-23.178

X35.803Y-22.277

X36.292Y-21.338

X36.713Y-20.366

X37.063Y-19.366

X37.34Y-18.344

X37.5Y-17.523

Y-17.521

X37.542Y-17.304

X37.67Y-16.252

X37.721Y-15.195

X37.725Y14.747

X37.685Y16.098

X37.571Y17.129

X37.5Y17.518

Y17.52

X37.385Y18.15

X37.127Y19.155

X36.799Y20.139

X36.403Y21.098

X35.94Y22.027

X35.413Y22.92

X34.824Y23.774

X34.176Y24.585

X33.474Y25.348

X32.719Y26.06

X31.916Y26.717

X31.068Y27.315

X30.765Y27.499

X30.763Y27.5

X30.181Y27.853

X29.258Y28.326

X28.303Y28.734

X27.323Y29.073

X26.321Y29.342

X25.303Y29.54

X24.273Y29.666

X23.237Y29.719

X-17.876Y29.725

X-18.665Y29.69

X-19.448Y29.597

X-20.223Y29.447

X-20.985Y29.241

X-21.729Y28.978

X-22.452Y28.662

X-22.669Y29.112

X-23.465Y28.688

X-24.223Y28.202

X-24.94Y27.656

X-25.115Y27.5

X-25.116Y27.499

X-25.611Y27.055

X-26.232Y26.401

X-26.798Y25.7

X-27.305Y24.956

X-29.362Y21.396

G00Z1.002

X1.797Y-1.767

Z-2.268

G01Z-3.268F300

Y-1.388Z-3.579

Y-0.956Z-3.81

Y-0.487Z-3.952

Y0.0Z-4.

Y3.271F1000

X3.125Y3.27

X3.444Y2.417

X3.814Y1.586

X4.236Y0.779

X4.706Y0.0

X4.236Y-0.779

X3.815Y-1.586

X3.444Y-2.417

X3.126Y-3.269

X1.797Y-3.27

Y0.0

X-1.203

Y6.273

X5.474Y6.269

X5.637Y5.401

X5.865Y4.548

X6.156Y3.714

X6.509Y2.905

X6.922Y2.124

X7.393Y1.377

X7.918Y0.668

X8.496Y0.0

X7.918Y-0.668

X7.393Y-1.378

X6.922Y-2.125

X6.509Y-2.905

X6.156Y-3.714

X5.865Y-4.547

X5.637Y-5.4

X5.475Y-6.268

X-1.203Y-6.271

Y0.0

X-4.203

X-4.202Y9.275

X8.345Y9.267

X8.347Y8.059

X8.376Y7.277

X8.476Y6.5

X8.644Y5.736

X8.88Y4.99

X9.183Y4.268

X9.549Y3.575

X9.975Y2.919

X10.459Y2.304

X10.996Y1.734

X11.581Y1.215

X12.212Y0.75

X12.881Y0.344

X13.584Y0.0

X12.876Y-0.347

X12.203Y-0.756

X11.57Y-1.225

X10.982Y-1.748

X10.443Y-2.323

X9.958Y-2.944

X9.531Y-3.606

X9.166Y-4.303

X8.865Y-5.031

X8.632Y-5.784

X8.467Y-6.554

X8.372Y-7.336

X8.348Y-8.123

X8.345Y-9.266

X-4.198Y-9.273

X-4.203Y-8.866

Y0.0

X-7.203Y0.001

X-7.202Y9.867

X-7.204Y9.909

X-7.176Y10.334

X-7.07Y10.747

X-6.89Y11.133

X-6.642Y11.48

X-6.334Y11.774

X-5.977Y12.007

X-5.583Y12.17

X-5.166Y12.257

X-4.429Y12.275

X11.098Y12.265

X11.191Y12.239

X11.269Y12.182

X11.321Y12.1

X11.34Y12.005

X11.347Y8.049

X11.376Y7.414

X11.476Y6.786

X11.644Y6.173

X11.879Y5.583

X12.179Y5.023

X12.538Y4.499

X12.954Y4.018

X13.42Y3.586

X13.932Y3.209

X14.482Y2.891

X15.064Y2.636

X15.671Y2.447

X16.295Y2.327

X16.928Y2.276

X17.01Y2.278

X17.432Y2.245

X17.841Y2.136

X18.223Y1.953

X18.565Y1.703

X18.856Y1.395

X19.084Y1.038

X19.243Y0.646

X19.327Y0.23

X19.336Y0.0

X19.327Y-0.237

X19.292Y-0.462

X19.235Y-0.682

X19.156Y-0.896

X19.056Y-1.1

X18.82Y-1.44

X18.527Y-1.733

X18.188Y-1.97

X17.811Y-2.143

X17.41Y-2.246

X16.998Y-2.278

X16.919Y-2.277

X16.84Y-2.28

X16.211Y-2.339

X15.593Y-2.468

X14.993Y-2.664

X14.418Y-2.925

X13.876Y-3.247

X13.372Y-3.628

X12.913Y-4.061

X12.505Y-4.543

X12.153Y-5.066

X11.86Y-5.626

X11.631Y-6.214

X11.468Y-6.823

X11.373Y-7.448

X11.348Y-8.078

X11.339Y-12.016

X11.324Y-12.094

X11.286Y-12.163

X11.229Y-12.217

X11.158Y-12.252

X11.014Y-12.265

X-4.917Y-12.273

X-5.294Y-12.242

X-5.662Y-12.149

X-6.009Y-11.996

X-6.325Y-11.788

X-6.603Y-11.53

X-6.833Y-11.229

X-7.011Y-10.895

X-7.131Y-10.535

X-7.189Y-10.16

X-7.203Y-8.9

Y0.001

X-10.202

Y9.825

X-10.184Y10.442

X-10.093Y11.053

X-9.932Y11.649

X-9.703Y12.223

X-9.409Y12.766

X-9.054Y13.27

X-8.642Y13.731

X-8.179Y14.14

X-7.672Y14.492

X-7.128Y14.783

X-6.553Y15.009

X-5.956Y15.166

X-5.345Y15.253

X-4.465Y15.275

X11.158Y15.265

X11.655Y15.214

X12.137Y15.088

X12.595Y14.891

X13.018Y14.625

X13.395Y14.299

X13.718Y13.918

X13.979Y13.493

X14.172Y13.033

X14.293Y12.55

X14.339Y12.053

X14.347Y8.033

X14.373Y7.614

X14.464Y7.204

X14.617Y6.812

X14.828Y6.449

X15.092Y6.123

X15.404Y5.841

X15.756Y5.611

X16.139Y5.438

X16.544Y5.326

X16.961Y5.277

X17.572Y5.252

X18.176Y5.156

X18.765Y4.991

X19.331Y4.76

X19.867Y4.464

X20.365Y4.109

X20.819Y3.699

X21.222Y3.239

X21.569Y2.735

X21.857Y2.195

X22.079Y1.626

X22.235Y1.034

X22.322Y0.429

X22.338Y0.0

X22.322Y-0.429

X22.246Y-0.987

X22.112Y-1.534

X21.92Y-2.064

X21.672Y-2.57

X21.327Y-3.102

X20.923Y-3.589

X20.463Y-4.025

X19.955Y-4.403

X19.406Y-4.719

X18.823Y-4.967

X18.215Y-5.144

X17.59Y-5.248

X16.958Y-5.277

X16.541Y-5.326

X16.136Y-5.439

X15.754Y-5.612

X15.403Y-5.842

X15.092Y-6.124

X14.827Y-6.45

X14.616Y-6.813

X14.464Y-7.204

X14.373Y-7.614

X14.347Y-8.033

X14.339Y-12.053

X14.292Y-12.558

X14.168Y-13.049

X13.968Y-13.516

X13.699Y-13.945

X13.366Y-14.328

X12.978Y-14.654

X12.544Y-14.917

X12.074Y-15.108

X11.58Y-15.225

X11.158Y-15.265

X-4.909Y-15.273

X-5.526Y-15.238

X-6.134Y-15.132

X-6.726Y-14.955

X-7.292Y-14.71

X-7.827Y-14.401

X-8.321Y-14.031

X-8.769Y-13.606

X-9.164Y-13.132

X-9.501Y-12.614

X-9.775Y-12.061

X-9.983Y-11.48

X-10.121Y-10.878

X-10.188Y-10.264

X-10.202Y-8.933

Y0.001

G00Z50.

G90G00Z50.

M09

M05

G91G28Z0

M30

%

-------------------------------------------------------------------------------------

华丽分割线

%

O0100

G17G40G49G80

G91G28Z0

( 10 )

G90G54G00X0Y0

G43H01Z50.S1000M03

G98G83X-24.928Y0.0Z-18.004R1.Q1.F500M09

G80Z50.

G90G00Z50.

M09

M05

G91G28Z0

M30

%

由于程序太大上转程序为图一,第二程序为转孔,实际加工应为图二效果!


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12247769.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-22
下一篇 2023-05-22

发表评论

登录后才能评论

评论列表(0条)

保存