電火花線切割機(jī)床編程應(yīng)用實(shí)例

發(fā)布日期:2011-05-21    蘭生客服中心    瀏覽:7704





例:在一塊270mm×165mm的方板上切割出如圖所示的長方形、三解形和圓形。其中P1、P2和P3為穿絲點(diǎn),電極絲的初始坐標(biāo)為(80,40)。


這里設(shè)計(jì)三個(gè)子程序,每個(gè)子程序完成一個(gè)圖形的加工,程序如下:


O0100(MAIN)


G92 X80.0 Y40.0;                       設(shè)定坐標(biāo)系


M98 P0101;                                調(diào)用子程序P1


G93 X0.0 Y0.0;                           坐標(biāo)平移


M50;                                          切斷絲


G90 G00 X100.0 Y120.0;          快速移動(dòng)


M60;                                          穿絲


M98 P0102;                                調(diào)用子程序P2


G93 X0.0 Y0.0;                           坐標(biāo)平移


M50;                                          切斷絲


G90 G00 X200.0 Y80.0;                     快速移動(dòng)


M60;                                          穿絲


M98 P0103;                                調(diào)用子程序P3


M30;                                          程序結(jié)束


<!--[if !vml]--><!--[endif]-->


子程序調(diào)用切割實(shí)例


O0101(P1)                                    子程序P1


G93 X120.0 Y60.0;                            坐標(biāo)原點(diǎn)平移到矩形的右上角處


G90 G01 Y0.0;                            絕對(duì)坐標(biāo)從矩形中心到矩形上邊中心處


X0.0;                                         到矩形右上角處


Y-40.0;                                       到矩形右下角處


X-80.0;                                      到矩形左下角處


Y0.0;                                         到矩形左上角處


X-40.0;                                      到矩形上邊中心處


Y-20.0;                                       回到矩形的穿絲點(diǎn)(矩形切割的起點(diǎn))


M99;                                          子程序結(jié)束返回主程序


O0102(P2)                                    子程序P2


G93 X100.0 Y80.0;                            坐標(biāo)平移三角形底邊中間處


G90 G01 Y60.0;                          到三角形頂點(diǎn)處


X40.0 Y0.0;                                到三角形右下角處


Y-40.0;                                       到三角形左下角處


X0 Y60.0;                                   到三角形頂點(diǎn)處


Y40.0;                                        回到三角形的穿絲點(diǎn)(三角形切割的起點(diǎn))


M99;                                          子程序結(jié)束返回主程序


O0103(P3)                                    子程序P3


G93 X200.0 Y80.0;                            坐標(biāo)平移到圓心處


G90 G01 Y40.0;                          到圓以上圓上一點(diǎn)


G02 J-40.0;                                順時(shí)針切割圓


G01 Y0.0;                                   回到圓心處


M99;                                          子程序結(jié)束返回主程序

更多相關(guān)信息