找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
查看: 27|回复: 0

[求助] 大佬们后处理G74 G75PQ值不对下面的代码怎么改

[复制链接]
2 G币 回复本帖可获得 2 G币奖励! 每人限 1 次

6

主题

518

回帖

7220

积分

少校

积分
7220
发表于 3 小时前 | 显示全部楼层 |阅读模式
global mom_template_subtype
  global mom_feed_cut_value
  global mom_operation_name
  global mom_machine_control_motion_output
  global mom_sys_output_cycle95
  global mom_sys_output_contour_motion
  global mom_sys_cycle_seq_num_on
  global dpp_finish_feed
  global dpp_turn_cycle_g_code
  global dpp_record_rough_cycle_seq
  global mom_cutcom_status
  global mom_operation_name_list
  global mom_machine_cycle_subroutine_name
  global dpp_G70_output
  global mom_level_step_angle
  global mom_clearance_from_faces
  global mom_clearance_from_diameters
  global dpp_turn_cycle_g_code
  global dpp_turn_cycle_retract
  global dpp_turn_cycle_msg
  global mom_motion_type
  global mom_output_file_directory
  global dpp_turn_cycle
  global mom_start_status
if {$g7475 == 1 } {
# Initialize mom_sys_output_contour_motion.
  #set mom_sys_output_contour_motion 0
#==========================================
# When output type set to machine cycle
#==========================================
  #if {[info exists mom_machine_control_motion_output] && $mom_machine_control_motion_output == 2} {
if {[string match "GROOVE_FACE" $mom_template_subtype]} {
         MOM_output_literal "G74 R[string trimright [format "%.3f" $mom_distance_] "0"]"
        MOM_output_literal "G74 X[string trimright [format "%.3f" [expr $mom_pos(0)*$mom_sys_lathe_x_double]] "0"] Z[string trimright [format "%.3f" $min_z] "0"] P[string trimright [format "%.3f" $mom_turn_cycle_cut_depth] "0"] Q[string trimright [format "%.3f" $mom_chip_control_constant_increment] "0"] F[string trimright [format "%.3f" $feed] "0"]"
}
     #-----------------------------------------------------------------
     # Check operation type.
     # Check postprocessor capability.
     # Check user settings in CAM setup.
     #-----------------------------------------------------------------
     if {![info exists mom_sys_output_cycle95] || $mom_sys_output_cycle95 != 1} {
       # MOM_output_to_listing_device "$mom_operation_name: Lathe Rough Cycle is not supported in Post Processor.\
                                      #\nSwitch output mode from Machine-Cycle to Non-Machine-Cycle."
     }
     #--------------------------------------------
     # Check whether a start point has been set.
     #--------------------------------------------
   if {(![info exists mom_start_status] || $mom_start_status != 1) && \
         (![info exists mom_motion_type] || $mom_motion_type != "APPROACH")} {
        # MOM_output_to_listing_device "$mom_operation_name: None of start point or approach path is defined before turning cycle in this operation."
        # set result "User Error"
    }
     #--------------------------------------------
     # Detect level step angle
     #--------------------------------------------
if {[string match "GROOVE" $mom_template_subtype] || [string match "GROOVE_OD" $mom_template_subtype]||[string match "GROOVE_ID" $mom_template_subtype]} {
if {[string match {*G75N*} $mom_path_name] ||$mom_operation_description=="75N"|| $mom_operation_description=="75n"}  {
  MOM_output_literal "G75 R[string trimright [format "%.3f" $mom_distance_] "0"]"
        MOM_output_literal "G75 X[string trimright [format "%.3f" [expr $max_x*$mom_sys_lathe_x_double]] "0"] Z[string trimright [format "%.3f" $min_z] "0"] P[string trimright [format "%.3f" "$mom_chip_control_constant_increment*1000"]"0" ] Q[string trimright [format "%.3f" "$mom_turn_cycle_cut_depth*1000"]"0" ] F[string trimright [format "%.3f" $feed] "0"]"
} else {
        MOM_output_literal "G75 R[string trimright [format "%.3f" $mom_distance_] "0"]"
        MOM_output_literal "G75 X[string trimright [format "%.3f" [expr $min_x*$mom_sys_lathe_x_double]] "0"] Z[string trimright [format "%.3f" $min_z] "0"] P[string trimright [format "%.3f" "$mom_chip_control_constant_increment*1000"]"0" ] Q[string trimright [format "%.3f" "$mom_turn_cycle_cut_depth*1000"] "0"] F[string trimright [format "%.3f" $feed] "0"]"
}
}
set g7475 0
#}



     #--------------------------------------------
     # Detect rough operation setting
     #--------------------------------------------
           ##############################################################################
           # Detect if rough and finish operation link together with subroutine name.
           # "MOM_post_oper_path" is used to post linked finish operation.
           # In this sub-post running, a tcl file is created. Contour data is setup into
           # "dpp_turn_cycle(finish_contour_data)".
           # Now with MOM_post_oper_path, contour data is not availabe. Motions between
           # "MOM_generic_cycle" is used as contour data.
           } ;##############################################################################

     #--------------------------------------------
     # Detect finish operation setting
     #--------------------------------------------


     #-----------------------------------------------------------------------------
     # Notify NX/Post to process contour data, set "mom_sys_output_contour_motion" .
     #
     #-----------------------------------------------------------------------------
     #
     # If user adds cutcom UDE, save the status and notify NX/Post to process part contour data.

set g7475 1
MOM_disable_address X Z G_motion F dwell G


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

本版积分规则

咨询QQ:1359218528|发帖须知!|Archiver|手机版|小黑屋|UG爱好者论坛 ( 京ICP备10217105号-2 )

GMT+8, 2026-1-15 21:57

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

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