登录【网站注册】点击左边“微信账号登陆”图标,微信扫描即自动注册并登陆
搜索
查看: 127|回复: 1

[后处理] 元泰精密华中8型数控系统2.42版本NX后处理定制方案

[复制链接]
发表于 2025-8-28 20:41:16 | 显示全部楼层 |阅读模式
今天接到元泰精密购置华中AC结构数控系统版本为8型2.42版本,NX后处理参数定制如下,请大家参考:
记事本打开YSUG5_HNC.ini文件
按如下修改
set L1 {%\nO[string range [expr ($OP + 9999)] 1 4]}
set L13 {#53620=$mom_tool_number\n($mom_operation_name)}  备注:可以不修改,默认
set L16 {N$NP T#53620 M06} 备注:可以不修改,默认
set L36 {G00 G90 G53 Y0.}
set L37 {M141\nM146}  
set L38 {G00 G90 A0. C0.}  
set L120 {A}  
set L121 {X}
set L122 {4+}
set L123 {120}
set L124 {0}
set L125 {M141}
set L126 {M40}  
set L130 {C}
set L131 {Z}
set L132 {5+}
set L133 {360}  
set L134 {-360}
set L135 {M146}
set L136 {M45}
set L137 {G00 G90 G53 Z0.\nG00 G90 G53 Y0.}

然后记事本打开YSUG5_HNC.def文件
ctrl+C搜索
BLOCK_TEMPLATE cycle_off

修改前                                 

BLOCK_TEMPLATE cycle_off
  {
       G_motion[$mom_sys_cycle_off]
      
  }


修改后
BLOCK_TEMPLATE cycle_off
  {
       G_motion[$mom_sys_cycle_off]
       Text[\nG109 B=0]
  }

搜索 BLOCK_TEMPLATE cycle_tap
修改前
BLOCK_TEMPLATE cycle_tap
  {
       G_feed[$mom_sys_feed_rate_mode_code($feed_mode)]\opt
       G_return[$mom_sys_cycle_ret_code($mom_cycle_retract_mode)]\opt
       tap_string[$final_tap_mode]
       G_adjust[$mom_sys_adjust_code]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       H[$mom_tool_adjust_register]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       F[$feed]
  }

修改后

BLOCK_TEMPLATE cycle_tap
  {
       G_feed[$mom_sys_feed_rate_mode_code($feed_mode)]\opt
       G_return[$mom_sys_cycle_ret_code($mom_cycle_retract_mode)]\opt
       tap_string[$final_tap_mode]
       G_adjust[$mom_sys_adjust_code]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       H[$mom_tool_adjust_register]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       F[$feed/$mom_spindle_speed]
  }

搜索 BLOCK_TEMPLATE cycle_tap_3

修改前
BLOCK_TEMPLATE cycle_tap_3
  {
       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[$final_tap_mode]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       Q_cutcom[$mom_cycle_delay]\opt
       F[$feed]
  }

修改后

BLOCK_TEMPLATE cycle_tap_3
  {
       Text[G108 B=0]
       Text[ \n]\nows

       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[$final_tap_mode]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       Text[J2]
       Text[E2]

       Q_cutcom[$mom_cycle_delay]\opt
       F[$feed/$mom_spindle_speed]
  }

搜索  BLOCK_TEMPLATE cycle_tap_4

修改前

BLOCK_TEMPLATE cycle_tap_4
  {
       G_feed[$mom_sys_feed_rate_mode_code($feed_mode)]\opt
       G_return[$mom_sys_cycle_ret_code($mom_cycle_retract_mode)]\opt
       tap_string[$final_tap_mode]
       G_adjust[$mom_sys_adjust_code]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       H[$mom_tool_adjust_register]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       F[$feed]
  }

修改后
BLOCK_TEMPLATE cycle_tap_4
  {
       G_feed[$mom_sys_feed_rate_mode_code($feed_mode)]\opt
       G_return[$mom_sys_cycle_ret_code($mom_cycle_retract_mode)]\opt
       tap_string[$final_tap_mode]
       G_adjust[$mom_sys_adjust_code]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       H[$mom_tool_adjust_register]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       F[$feed/$mom_spindle_speed]
  }

搜索 BLOCK_TEMPLATE cycle_tap_break_chip
修改前
BLOCK_TEMPLATE cycle_tap_break_chip
  {
       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[84]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       cycle_step[$mom_cycle_step1]\opt
       F[$feed]
  }


修改后
BLOCK_TEMPLATE cycle_tap_break_chip
  {
       Text[G108 B=0]
       Text[ \n]\nows

       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[84]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       Text[J2]
       Text[E2]

       cycle_dwell[$mom_cycle_delay]\opt
       cycle_step[$mom_cycle_step1]\opt
       F[$feed/$mom_spindle_speed]
  }


搜索 BLOCK_TEMPLATE cycle_tap_deep
修改前
BLOCK_TEMPLATE cycle_tap_deep
  {
       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[84]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       cycle_dwell[$mom_cycle_delay]\opt
       cycle_step[$mom_cycle_step1]\opt
       F[$feed]
  }

修改后
BLOCK_TEMPLATE cycle_tap_deep
  {
       Text[G108 B=0]
       Text[ \n]\nows

       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[84]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       Text[J2]
       Text[E2]

       cycle_dwell[$mom_cycle_delay]\opt
       cycle_step[$mom_cycle_step1]\opt
       F[$feed/$mom_spindle_speed]
  }

搜索 BLOCK_TEMPLATE cycle_tap_float
修改前
BLOCK_TEMPLATE cycle_tap_float
  {
       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[$final_tap_mode]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       F[$feed]
  }

修改后
BLOCK_TEMPLATE cycle_tap_float
  {
       Text[G108 B=0]
       Text[ \n]\nows

       G_return[$mom_sys_cycle_ret_code(AUTO)]\opt
       tap_string[$final_tap_mode]
       X[$mom_cycle_feed_to_pos(0)]
       Y[$mom_cycle_feed_to_pos(1)]
       Z[$mom_cycle_feed_to_pos(2)]
       R[$mom_cycle_rapid_to_pos($mom_cycle_spindle_axis)]
       Text[J2]
       Text[E2]

       F[$feed/$mom_spindle_speed]
  }



搜索  BLOCK_TEMPLATE initial_move_G00_XYAC_M08
修改前
BLOCK_TEMPLATE initial_move_G00_XYZAC_M08
  {
       G_motion[$mom_sys_rapid_code]
       G_mode[$mom_sys_output_code($mom_output_mode)]
       X[$mom_pos(0)]
       Y[$mom_pos(1)]
       Z[$mom_pos(2)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       M_coolant[$mom_sys_coolant_code($mom_coolant_status)]\opt
  }
修改后
BLOCK_TEMPLATE initial_move_G00_XYAC_M08
  {
      
       G_motion[$mom_sys_rapid_code]
       Text[G94]
       G_mode[$mom_sys_output_code($mom_output_mode)]
       X[$mom_pos(0)]
       Y[$mom_pos(1)]
       fourth_axis[$mom_out_angle_pos(0)]
       fifth_axis[$mom_out_angle_pos(1)]
       M_coolant[$mom_sys_coolant_code($mom_coolant_status)]\opt
  }

搜索 BLOCK_TEMPLATE initial_move_G43ZH (备注:此项根据厂家机床格式可以默认,不修改)
修改前
BLOCK_TEMPLATE initial_move_G43ZH
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_pos(2)]
       H[$mom_tool_adjust_register]
  }
修改后
BLOCK_TEMPLATE initial_move_G43ZH
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_pos(2)]
       H[#53620]
  }

搜索  BLOCK_TEMPLATE initial_move_G43ZH_M08
修改前
BLOCK_TEMPLATE initial_move_G43ZH_M08
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_pos(2)]
       H[$mom_tool_adjust_register]
       M_coolant[$mom_sys_coolant_code($mom_coolant_status)]\opt
  }

修改后
BLOCK_TEMPLATE initial_move_G43ZH_M08
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_pos(2)]
       H[#53620]
       M_coolant[$mom_sys_coolant_code($mom_coolant_status)]\opt
  }

搜索 BLOCK_TEMPLATE initial_move_Z_cycle
修改前
BLOCK_TEMPLATE initial_move_Z_cycle
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_cycle_retract_to_pos(2)]
       H[$mom_tool_adjust_register]
  }

修改后
BLOCK_TEMPLATE initial_move_Z_cycle
  {
       G_adjust[$mom_sys_adjust_code]
       Z[$mom_cycle_retract_to_pos(2)]
       H[#53620]
  }

搜索 BLOCK_TEMPLATE length_compensation
修改前
BLOCK_TEMPLATE length_compensation
  {
       G_adjust[43.4]
       H[$mom_tool_adjust_register]
  }
修改后
BLOCK_TEMPLATE length_compensation
  {
       G_adjust[43.4]
       H[#53620]
  }

搜索 BLOCK_TEMPLATE length_compensation_fanuc
修改前
BLOCK_TEMPLATE length_compensation_fanuc
  {
       Text[$MCS\n]\nows
       Text[G00 G90]
       rotate_X[$mom_pos(0)]
       rotate_Y[$mom_pos(1)]
       Text[A0. C0.\n]\nows
       G_adjust[43.4]
       H[$mom_tool_adjust_register]
  }
修改后
BLOCK_TEMPLATE length_compensation_fanuc
  {
       Text[$MCS\n]\nows
       Text[G00 G90]
       rotate_X[$mom_pos(0)]
       rotate_Y[$mom_pos(1)]
       Text[A0. C0.\n]\nows
       G_adjust[43.4]
       H[#53620]
  }

最终效果:
%
O0001
(2025/08/28 20:51 DAY4)
(TIME=190.75 MIN)
(==========TOOL LIST START=========)
(刀号--刀补--径补--切削深度--刀具名称)
(T13 | H13 | D00 | -13.95 | TAP-M5X0.8)
(==========TOOL LIST END===========)
G17 G40 G49 G80
G00 G90 G53 Z0.
#53620=13
(攻丝)
N1 T#53620 M06
S200 M03
(TAP-M5X0.8 D=5.00 R=0.00)
G49
M141
M146
G54
G00 G90 A0.0 C0.0
G43.4 H#53620
G68.2 X0.0 Y0.0 Z0.0 I0.0 J0.0 K0.0
G53.1
G00 G94 G90 X44.7857 Y-2.2941 M08
M40
M45
Z30.
G108 B0=0  
G98 G84 X44.7857 Y-2.2941 Z-13.958 R1. J2 E2 Q2. F.8
G108 B0=0  
Y7.8659 J2 E2
G108 B0=0  
X7.1427 Y15.1237 J2 E2
G108 B0=0  
X-22.557 Y-1.6727 J2 E2
G108 B0=0  
X-26.5094 Y6.9935 J2 E2
G108 B0=0  
G98 G84 X-38.9144 Y22.3179 Z-12.7139 R-8.3764 J2 E2 F.8
G80
G109 B=0
G69
G49
M05
M09
G00 G90 G53 Z0.
G00 G90 G53 Y0.
G00 G90 G53 Y0.
M141
M146
G00 G90 A0. C0.
M30
%
已经修改好的模板:


华中8型2.42版AC后处理.zip

11.17 KB, 下载次数: 4

【温馨提示】技术问题请优先发到问答专栏,优胜教师团队将及时回复,谢谢!
发表于 2025-8-28 21:07:07 来自手机 | 显示全部楼层
牛,看着一头雾水
【温馨提示】技术问题请优先发到问答专栏,优胜教师团队将及时回复,谢谢! ...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


快速回复 返回顶部 返回列表