|
我的是海德汉系统,想自动输出循环32值,如果只有一个工序提取是对的,如果有多个工序,每次提取的是最后一个工序的公差,请问老师该怎么改?
global mom_inside_outside_tolerances
if {[info exists mom_inside_outside_tolerances]} {
set intol [format "%.4f" $mom_inside_outside_tolerances(0)]
set outtol [format "%.4f" $mom_inside_outside_tolerances(1)]
set tol [format "%.3f" [expr $intol + $outtol]]
}
MOM_output_literal "(Tol1: $tol)"
if { $tol< 0.003} {
MOM_output_literal "CYCL DEF 311 OSS ~"
MOM_output_literal "Q1592=+3 ;Tuning ~"
MOM_output_literal "Q1593=+0 ;Weight"
MOM_output_literal "CYCL DEF 32.0 TOLERANCE"
MOM_output_literal "CYCL DEF 32.1 T0.003"
MOM_output_literal "CYCL DEF 32.2 HSC-MODE:0"
MOM_output_literal ";(Subop_end)"
}
if { $tol> 0.003} {
MOM_output_literal "CYCL DEF 311 OSS ~"
MOM_output_literal "Q1592=+3 ;Tuning ~"
MOM_output_literal "Q1593=+0 ;Weight"
MOM_output_literal "CYCL DEF 32.0 TOLERANCE"
MOM_output_literal "CYCL DEF 32.1 T0.01"
MOM_output_literal "CYCL DEF 32.2 HSC-MODE:1"
MOM_output_literal ";(Subop_end)"
}
|
|