|
|
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
|
|