MASTERCAM后处理的设置和参数修改

  • 格式:doc
  • 大小:30.50 KB
  • 文档页数:14

真诚为您提供优质参考资料,若有不当之处,请指正。

1 / 14 MASTERCAM后处理的设置和参数修改

后置处理文件简称后处理文件,MASTERCAM后置处理文件是一种可以由用户以回答问题的形式自行修改的文件,其扩展名为.PST。安装MASTERCAM时系统会自动安装默认的后处理为MPFAN.PST.在应用Mastercam软件的自动编程功能之前,必须先对这个文件进行编辑,才能在执行后处理程序时产生符合某种控制器需要和使用者习惯的NC程序,如果没有全部更正,则可能造成事故. MASTERCAM提供了不同系列的后处理文件,它们在内容上略有不同,但其格式及主体部分是相似的,一般都包括以下部分:

1) 注释部分。对后处理文件及其设定方法作一般性介绍.此部分内容一般都不用更改.

以下是截取的部分注释:(注释前都带#号,系统在执行代码处理时是不会读取前面带#号的语句的.)

# Post Name : MPFAN

# Product : MILL

# Machine Name : GENERIC FANUC

# Control Name : GENERIC FANUC

# Description : GENERIC FANUC MILL POST

# Associated Post : NONE 真诚为您提供优质参考资料,若有不当之处,请指正。

2 / 14 # Mill/Turn : NO

# 4-axis/Axis subs. : YES

# 5-axis : NO

# Subprograms : YES

# Executable : MP v9.0

#

# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR

MODIFICATION TO

# THE MACHINE TOOL REQUIREMENTS AND PERSONAL

PREFERENCE.

2) 系统程序规划部分(Debugging and Factory Set

Program Switches)。此部分是MASTERCAM版本的后处理系统规划,每个版本都大同小异,一般不需更改.以下截取的是9.0版的)

m_one : -1 #Define constant

zero : 0 #Define constant

one : 1 #Define constant

two : 2 #Define constant

three : 3 #Define constant

four : 4 #Define constant

five : 5 #Define constant

c9k : 999 #Define constant 真诚为您提供优质参考资料,若有不当之处,请指正。

3 / 14

fastmode : yes #Enable Quick Post Processing, (set

to no for debug)

bug1 : 2 #0=No display, 1=Generic list box,

2=Editor

bug2 : 40 #Append postline labels, non-zero is

column position?

bug3 : 0 #Append whatline no. to each NC line?

bug4 : 1 #Append NCI line no. to each NC line?

whatno : yes #Do not perform whatline branches?

(leave as yes)

get_1004 : 1 #Find gcode 1004 with getnextop?

rpd_typ_v7 : 0 #Use Version 7 style contour

flags/processing?

strtool_v7 : 2 #Use Version 7+ toolname?

tlchng_aft : 2 #Delay call to toolchange until move

line

cant_tlchng : 1 #Ignore cantext entry on move with

tlchng_aft

newglobal : 1 #Error checking for global variables

getnextop : 0 #Build the next variable table 真诚为您提供优质参考资料,若有不当之处,请指正。

4 / 14

3)常规后处理设定部分(General Output Settings)。此部分可视情况更改,以适合机床或个人使用.以下截取的是9.0版的一些常规设定.冒号前面的是变量,冒号后面的是设定值,#号后面是注解(一般是说明0代表什么,1代表什么,2代表什么,yes或no)

sub_level : 1 #Enable automatic subprogram

support(启用自动支持子程序)

breakarcs : 2 #Break arcs, 0 = no, 1 = quadrants,

2 = 180deg. max arcs(打断圆弧方式)

arcoutput : 1 #0 = IJK, 1 = R no sign, 2 = R signed

neg. over 180(转出圆弧方式)

arctype : 2 #Arc center 1=abs, 2=St-Ctr, 3=Ctr-St,

4=unsigned inc.

do_full_arc : 0 #Allow full circle output? 0=no,

1=no (是否转成整圆方式)

helix_arc : 0 #Support helix arc output, 0=no,

1=all planes,2=XY plane only(是否转成螺旋弧)

arccheck : 1 #Check for small arcs, convert to

linear(是否检测小圆弧并将其转成线) 真诚为您提供优质参考资料,若有不当之处,请指正。

5 / 14 atol : .01 #Angularity tolerance for arccheck =

2(圆弧角度公差)

ltol : .002 #Length tolerance for arccheck = 1(圆弧长度公差)

vtol : .1 #System tolerance(系统公差)

maxfeedpm : 500 #Limit for feed in inch/min(最大进给-英制)

ltol_m : .05 #Length tolerance for arccheck = 1,

metric(圆弧长度公差-公制)

vtol_m : .0025 #System tolerance, metric(系统公差-公制)

maxfeedpm_m : 10000 #Limit for feed in mm/min(最大进给-公制)

force_wcs : no #Force WCS output at every

toolchange?(换刀时是否转出WCS坐标)

spaces : 0 #Number of spaces to add between

fields(两行之间是否加入空格)

omitseq : yes #Omit sequence numbers?(是否省略序列号)

seqmax : 9999 #Max. sequence number(最大序列号)

stagetool : 0 #0 = Do not pre-stage tools, 1 = Stage

tools(是否沿用刀具) 真诚为您提供优质参考资料,若有不当之处,请指正。

6 / 14 use_gear : 0 #Output gear selection code, 0=no,

1=no (是否转成齿轮代码)

max_speed : 10000 #Maximum spindle speed(最大转速)

min_speed : 50 #Minimum spindle speed(最小转速)

nobrk : no #Omit breakup of x, y & z rapid moves

progname : 0 #Use uppercase for program name

(sprogname)(程式名称是否使用大写)

4)中间其它内容,例如:Common User-defined(指令设定部分), Format statements(格式报告),definitions for

NC output(NC代码限定),Error messages(出错信息),Toolchange / NC output Variable Formats(刀具变量)等基本上都是系统固定格式,不需要更改,如果改错的话,系统很可能不执行或机床报警......

5) 文本内容和换刀设定部分(Start of File and

Toolchange Setup)。此部分内容很重要,很多使用者都从这里着手把程式改成自己需要的格式.以下截取的是9.0版的部分内容,其中中文是注解.引号内是可以更改的内容.

"%", e(程式开头的百分号) 真诚为您提供优质参考资料,若有不当之处,请指正。

7 / 14 *progno, e(程式号码)

comment(注解,可有可无,如不需要则删除此句)

"(PROGRAM NAME - ", sprogname, ")", e(程式名称,可有可无)

"(", *tnote, *toffnote, *tlngnote, *tldia, ")",

e(刀具直径及补正参数显示,如不需要则把此整句删除)

"(DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time,

")", e(程式日期显示,可有可无)

pbld, n, *"/M99", e (如不需要则整句删除,而不是只删除引号内的内容)

pbld, n, *"G90", "G92","X0.Y0.Z10.", e(定义加工原点,也可以改为G54坐标)

sav_absinc = absinc (绝对坐标系)