当前位置:文档之家› PowerMILL后处理修改教程

PowerMILL后处理修改教程

PowerMILL后处理修改教程本教程是偶在实际使用中的PowerMILL后处理文件修改知识的积累,其中有部分修改案例来源于帮助文件,在此仅以文字和图片的形式把他记录下来与初学者共同分享。

By mymould(风影爱人)一、完整的后处理文件介绍一个完整的后处理文件通常有:定义字符段、定义字符格式段、定义键值段、定义指令值段、变量定义、程序格式段等部分组成。

下面我们先来看一个比较完整的后处理文件,并把它分为数段,把需要修改的地方做个必要的解释:machine fanucom ——————后处理文件头=========================== 第一部分是定义字符段============================== define word TNaddress letter = "TOOL TYPE:- "address width = 13field width = 25end define具体解释:define word TN ——————————————定义字段;address letter = "TOOL TYPE:- " —————定义字段的返回值,比如在后处理文件里有“MS=C ; TN ToolType ; EM =C”,而在写程式的时候选用的是端铣刀,那么在CNC程式里就会有(TOOL TYPE:- ENDMILL);address width = 13 ———————————定义字符宽度,如上"TOOL TYPE:- ",从T开始算起一共13位,包括空格;field width = 25 ———————————定义返回字的宽度,如上"ENDMILL",如果fieldwidth = 2,那"TOOL TYPE:- "就返回EN;如果field width = 25,那"TOOL TYPE:- "就返回ENDMILL。

end define========================== 第二段是定义字符的格式============================= define format ( / G6 S T M1 M2 L P D E H O )address width = 1field width = 2exponent width = 0scale factor = 1scale divisor = 1tape position = 0print position = 1sign = nonenot permanentnot modalmetric formatsleading zeros = falsetrailing zeros = truedecimal point = false 控制公制尺寸的前导零、后导零,小数点decimal places = 0imperial formatsleading zeros = falsetrailing zeros = truedecimal point = false 控制英制尺寸的前导零、后导零,小数点decimal places = 0end defineword order = ( OP N G1 G2 G3 G4 G5 )word order = ( + G6 G7 X Y Z B C )word order = ( + I J K R D S T )word order = ( + H M1 M2 MS msg EM Q ) 注册字符word order = ( + Q1 Z2 R2 ID F )word order = ( + TN TD TR DY MT YR PM )========================== 第三段是定义键值=================================== define keysblocknumber = N ——————定义程序段号preparatory function = G1 ———————定义准备功能指令aux function = M1 ——————定义辅助功能指令x feedrate not used —————定义X进给率指令y feedrate not used —————定义Y进给率指令z feedrate not used —————定义Z进给率指令circle angle not used —————圆周角度x coordinate = X ——————定义X坐标轴y coordinate = Y ——————定义Y坐标轴z coordinate = Z ——————定义Z坐标轴key i = I ——————定义X轴矢量I键key j = J ——————定义Y轴矢量J键key k = K ——————定义Z轴矢量K键feedrate = F ——————定义进给率指令feedrate per revolution = F ———————定义每转进给率指令spindle = S ——————定义主轴指令tool number = T ——————定义刀具指令cycle dwell not useddwell = X —————定义暂停时间键值tool length = H ——————定义刀具长度补偿指令tool radius = D ——————定义刀具半径补偿指令drill peck depth = Q1 ——————钻孔的啄钻深度drill hole depth = Z2 ——————定义钻孔深度clearplane = R2 —————定义安全平面高度message start = MS —————定义注释的开始符message end = EM ————定义注释的结束符opskip = OP ————定义跳段符号radius = R —————定义半径R键program id = ID —————定义程序号azimuth axis = B —————在多轴加工中,定义方位轴elevation axis = C —————在多轴加工中,定义仰角轴3rd rotation axis = null —————在多轴加工中,定义第三旋转轴leader not usedx vector not usedy vector not usedz vector not usederror not usedend define========================== 定义指令值======================================== define codesrapid = G1 0 ========== 快速点定位linear = G1 1 =========== 直线插补circle cw = G1 2 =========== 顺圆插补circle ccw = G1 3 ========== 逆圆插补dwell = G6 4 ========= 暂停、准确停止xy plane = G3 17 ========= XY平面zy plane = G3 19 ========= YZ平面xz plane = G3 18 ========= ZX平面compensation off = G2 40 ========== 取消刀具半径补偿compensation on left = G2 41 =========== 刀具半径左补偿compensation on right = G2 42 =========== 刀具半径右补偿imperial data = G4 20 ============ 英寸输入metric data = G4 21 ============ 毫米输入absolute data = G5 90 ============ 指定绝对坐标编程incremental data = G5 91 ============ 指定增量坐标编程from = G3 54 ========== 制定工作坐标系feedrate per minute not used ================ 每分钟进给feedrate per revolution not used ================= 每转进给spindle rpm not usedconstant surface speed not useddrill = G4 81 =========== 钻孔循环锪镗循环break chip = G4 82 =========== 钻孔循环或反镗循环deep drill = G4 83 ============ 深孔钻循环tap = G4 84 ========== 攻丝循环bore 1 = G4 85 ========== 镗孔循环bore 2 = G4 86 ========== 镗孔循环bore 3 = G4 87 ========== 背镗循环bore 4 = G4 88 ========== 镗孔循环bore 5 = G4 89 ========== 镗孔循环end of drill = G4 80 ============= 固定循环取消macro start not used ============ 宏程序模态调用macro end not used =========== 宏程序模态调用取消macro call not used ============ 宏程序调用cycle retract = G6 99 ========== 固定循环返回到R点tool length offset = G3 43 =========== 正向刀具长度补偿spline not used ======== spline插补方式stop = M1 0 ==== 程序停止opt stop = M1 1 ===== 选择停止spindle on cw = M1 3 ===== 主轴正转spindle on ccw = M1 4 ===== 主轴逆转spindle off = M1 5 ===== 主轴停止spin coolant on cw = M1 13spin coolant on ccw = M1 14spin coolant off = M1 5 ====== 冷却液关change tool = M1 6 ====== 自动换刀coolant on mist = M1 7 ===== 雾状冷却液coolant on = M1 8 ==== 冷却液开coolant on flood = M1 8 ===== 冷却液开(喷出)coolant off = M1 9 ===== 冷却液关clamp on not usedclamp off not usedend of tape = M1 2 ===== 程序结束end of prog = M1 30 ===== 程序结束gear range 1 not usedgear range 2 not usedgear range 3 not usedconstant contour speed not usedconstant contour speed 2 not usedword drill not usedword break chip not usedword deep not usedword tap not usedword bore 1 not usedword bore 2 not usedword bore 3 not usedword bore 4 not usedword bore 5 not usedcoolant on tap not usedrigid tap not used ====== 刚性攻丝helical drill not usedhelical retract drill not usedend define================================ 定义变量====================================== print header = "Delcam Postprocessor" ================== 定义打印标题machine name = "Fanuc6m version 1.2" ========= 机器名point = "." ================================ 小数点zero = "0" =============================== 零tape headers = 1 ============================== 纸带标题(integer 6 、integer 7):定义coolant output(冷却液输出)integer 6 = 2 ============== 定义冷却液开(M07、M08)的输出方式,此变量共有三个选项——0:在后处理时遇到相关指令时输出;1:在下一段中单独输出;2、在下一段中和坐标移动一起输出。

相关主题