会员登陆 | 会员注册 | 帮助中心 | 忘记密码? | 会员中心
搜索类型: 下载    文章    图片    影视    商城    商城   
       
后处理修改帮助 (1)
2008-01-29 05:12:08  作者:  来源:互联网  浏览次数:182  文字大小:【】【】【
对于后处理格式,一般的用户有三个层次的需求:

    一、PM 自带的后处理中有适合自己机床要求的,不过要修改、增删些代码。
    二、没有适合的,需要改写后处理。
    三、机床的代码格式完全与普通 G 代码格式不同,需建全新的后处理。

现在开始准备工作:
 
    1、以不同的控制器试着处理几个G代码文件出来,然后和自己机床的代码进行比较,选一个最接近自己的。  
    2、打开ductpost\dp-index.html,准备有问题就看帮助。      
    3、运行:ductpost -w [控制器类型] > [控制器类型].opt ,从而生成OPT文件,这个选最接近你机床的控制器。如:ductpost -w hurco > hurco.opt 。 这时就可以用文本编辑器来打开这个opt文件了:

1、程序头、程序尾的改写:
这个在以下的定义里面:
          define block tape start
          ********************
          end define
          define block tape end
          *******************
          end define

你可以根据自己的需要添加,如:

        define block tape start
          "%"
          N ; "G17G90G80G40G49"
        end define

        define block tape end
          N ; "M05"
          N ; "M30"
      end define
   
不过注意这种引号方法优点是简单明了,但控制器只是把它当字符处理,而不能以模态存在,具体可参见其它说明。

2、是否需要N行号?
        %
        :0001
        N10G28G91X0Y0Z0
        N30T1M6
        N40G0G90X-25.Y-40.S800 M3
   
如这上面的N10、N30、N40,另外行号的起始、增量、最大都可以定义。如果不想要行号,可修改为以下值:
                  define format ( N )
                      not permanent
                  end define

3、是否需要Message?

      N60( MSG, Toolpath Name: ET)
      N70( MSG, xyzxyz_cut_1 ET)
      N80( MSG, Output: ET)
      N90( MSG, UNITS: MILLIMETRES ET)
      N100( MSG, TOOL COORDINATES: TIP ET)
      N110( MSG, LOAD TOOL ET)

上面的信息,可修改为你需要的,具体参见帮助。也可选择不输出,如:
   
      message output = false

4、圆弧的输出格式:
     
这个需要讲一下,输出R的就不讲了,专讲I、J、K的输出。大致有三大类:
   
      a、I、J输出为圆心的绝对坐标值。  
      b、I、J输出为相对坐标值,具体值为:圆心坐标值-圆弧始点坐标(常用)    
      c、I、J输出为相对坐标值,具体值为:圆弧始点坐标-圆心坐标值
     
      define format (I J K)   :定义I J K的矢量
        scale factor = -1
      end define
5.定义左右刀具补偿
      define codes                
      comp on left = G2 41
      comp on right = G2 42
      comp off     = G2 40  
      end define
     
#14 :从#14~#41为定义旋转轴的写法,如小数点的位数,+/-的输出等等
     
define format ( A )
  address letter = "A"
  address width = 1
  field width = 8
  metric formats
  decimal places = 3
  decimal point = true
  sign = if negative
  leading zeros = false
  trailing zeros = true
end define
#26
  word order = (+ A )
#28
        units = metric
  message output = false
  spindle output = (2 0 0 0 )
  coolant output = ( 1 2 )
#32
define format ( C )
  address letter = "C"
  address width = 1
  field width = 8
  metric formats
  decimal places = 3
  decimal point = true
  sign = if negative
  leading zeros = false
  trailing zeros = true
end define
#39
  word order = (+ C )
#41
        units = metric
  message output = false
  spindle output = (2 0 0 0 )
  coolant output = ( 1 2 )

#33
  define keys             :定义旋转轴名称
  azimuth axis   = C
  elevation axis   = A
  end define
#38
  azimuth axis parameters = (0. 0. 0. 0. 0. 1. )
  elevation axis parameters = (0. 0. 0. 1. 0. 0. )
#41
    spindle azimuth rotation = true     :定义方位轴方式,true为主轴头式false为工作台式
  spindle elevation rotation = true     :定义俯仰轴方式,true为主轴头式false为工作台式
#44
      azimuth axis direction = positive       :定义方位轴用法,相对还是绝对
    elevation axis direction = positive       :定义俯仰轴用法,相对还是绝对
#47
    azimuth axis units = degrees         :定义方位轴单位
  elevation axis units = degrees         :定义俯仰轴单位
#50
    azimuth axis parameters   = (     0     0     0     0     0     1 )     :定义方位轴参数
    azimuth centre         = (     0     0     0 )                   :定义方位轴圆心参数
    elevation axis parameters = (     0     0     0     1     0     0 )     :定义俯仰轴参数
    elevation centre       = (     0     0     0 )                   :定义俯仰轴圆心参数
    pcs origin           = (     0     0     0     0     0     0 )     :定义旋转轴圆心
    linear axis limits       = ( -99999 999999 -99999 999999 -99999 999999 )     :定义线性轴范围
    rotary axis limits       = ( -99999 999999 -99999 999999   999     1 )     :定义旋转轴范围
    move safe angles       = (     0     0     0     0     0     0 )     :定义起始角度
    linearise multiaxis moves     = false     :定义机床是否支持线性多轴联动,false为支持true为不支持
    multiaxis coordinate transform = false     :定义机床是否支持多轴联动,false为支持true为不支持
    integer 3   = 1       :定义是否进行多轴处理      
    integer 9   = 5
    integer 22   = 1
    integer 23   = 1
    integer 24   = 0
    integer 25   = 0
    integer 28   = 1      
    integer 38   = 0
    integer 40   = 10
    block start   = 1
    block increment = 1    
maximum feedrate = 16000.0         :定义最大进给量
comp output   = (1 1 1 2)
message output = false           :定义是否输出信息,false为不输出true为输出
block order = true
define block tape start
end define
define block tool change first clear :定义程序头和换刀及换刀后的第一个动作
"T1 M6 D1"
"TRAORI(1)"
"HSM"
S ToolSpeed ; M1 3
G6 54
G5 90 ; G1 0 ; Z FromZ
G5 90 ; G1 0 ; X FromX ; Y FromY
end define
define block move rapid             :定义快速移动
G1 ; X ; Y ; Z ; A ; C
end define
define block move circle
G1 ; G2 ; X ; Y ; Z ; I ; J ; K ; D ; A ; C ; F ; M2   :定义线圆弧移动
end define
define block move linear
G1 ; G2 ; X ; Y ; Z ; D ; A ; C ; F ; M2           :定义线性移动方式
end define
define block tape end                         :定义程序尾
"M5 M9"
"M30"
end define
end      
     
所以这个就要看你机床格式来具体设置了,修改以下值为你所需:      
      incremental centre = true (相对,反之false绝对)      
相对有两种,所以:      
      scale factor = 1 或 -1    
另外有些机床不能输出360度的圆弧,这时需要将其分为几段输出:
        full circle = false
5、换刀的格式:
如:      
        define block tool change first
          N ; OP ; change tool ; T ToolNum
          N ; "G48"
          N ; G1 0
[1] [2]

· 使用POWERMILL加工机锻模的工艺与技巧
· PowerMILL 6.008+SP7 中文版
· 使用DELCAM软件的几个技巧
· 高速加工及PowerMILL软件中的创新...
· CAPPWorks:SolidWorks用户群解决方案
· CAD/CAM在精锻直齿锥齿轮加工过程...
· CAD/CAM在精锻直齿锥齿轮加工过程...
· PowerMILL 模具程编技巧
· PowerMILL后处理修改教程
· PowerMILL快速键使用方式
· 使用POWERMILL加工机锻模的工艺与技巧
· PowerMILL 6.008+SP7 中文版
· 使用DELCAM软件的几个技巧
· 高速加工及PowerMILL软件中的创新...
· CAPPWorks:SolidWorks用户群解决方案
· CAD/CAM在精锻直齿锥齿轮加工过程...
· CAD/CAM在精锻直齿锥齿轮加工过程...
· PowerMILL 模具程编技巧
· PowerMILL后处理修改教程
· PowerMILL快速键使用方式
关于我们 | 联系我们 | 开发团队 | 免责申明 | 站点地图 | 下载帮助
CAX频道 旗舰CAD/CAM/CAE/CAX下载专业网站   FMcaX版权所有 ©2007-2008
在线咨询:   QQ:76771131     QQ:956477  
     粤ICP备07502650号    FMcaX.com