找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
楼主: Yui*

3轴自用后处理3个手动换刀和自动换刀都带刀具信息

 火... [复制链接]

2

主题

683

回帖

4963

积分

中尉

积分
4963
发表于 2016-11-21 21:14:53 | 显示全部楼层
XCCCCXX

0

主题

278

回帖

6702

积分

上尉

积分
6702

灌水王

发表于 2016-11-24 13:32:19 | 显示全部楼层
这个很好,很强大,支持UG爱好者论坛!

0

主题

278

回帖

6702

积分

上尉

积分
6702

灌水王

发表于 2016-11-24 13:33:05 | 显示全部楼层
这个很好,很强大,支持UG爱好者论坛!

40

主题

144

回帖

4625

积分

中尉

积分
4625
发表于 2016-11-24 14:10:04 | 显示全部楼层
不错  不错

40

主题

144

回帖

4625

积分

中尉

积分
4625
发表于 2016-11-24 14:10:32 | 显示全部楼层
很厉害不错呢

40

主题

144

回帖

4625

积分

中尉

积分
4625
发表于 2016-11-24 16:01:23 | 显示全部楼层
MOM_set_seq_on
set outputthd 1
global toollist  mom_tool_cutcom_register mom_cutcom_adjust_register mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_adjust_register mom_tool_adj_reg_defined mom_tool_number
set tdi [ format  "%.2f" $mom_tool_diameter]
set tr [ format  "%.2f" $mom_tool_corner1_radius]

if [info exists mom_tool_number] {
    set tt $mom_tool_number
} else {
    set tt 0
}
if [info exists mom_tool_adj_reg_defined] {
    set th $mom_tool_adjust_register
} else {
    set th 0
}
if [info exists mom_tool_adj_reg_defined] {
    set td $mom_tool_cutcom_register
} else {
    set td 0
}
set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]

set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]

if {$outputthd == 1 } {
    MOM_output_literal "(T$tt:$mom_tool_name D=$tdi R=$tr H$th D$td)"
} else {
    MOM_output_literal "(T00:$mom_tool_name D=$tdi R=$tr H00 D$td)"
}
MOM_set_seq_off
global mom_spindle_rpm
global mom_feed_cut_value
global mom_stock_part side
global mom_stock_floor
global mom_stock use floor same as side
global mom_operation_type
global mom_motion_type

global mom_operation_name




set partstock 0
set floorstock 0



if [info exists mom_stock_floor] {
    set partstock [format "%.2f" $mom_stock_part side]
    set floorstock [format "%.2f" $mom_stock_floor]
}
if {$mom_operation_type == "point to point"} {
    set partstock 0
    set floorstock 0
}

MOM_output_literal "(RMP:[format $mom_operation_name] S[format "%.0f" $mom_spindle_rpm] F[format %.1f $mom_feed_cut_value])"
MOM_output_literal "(Part stock=[format "%.2f" $partstock]MM  floor stock=[format "%.2f" $floorstock]MM)"


global ptp_file_name
set tmp_file_name "${ptp_file_name}_"
if {[file exists $tmp_file_name]} {
MOM_remove_file $tmp_file_name
}
MOM_close_output_file $ptp_file_name
file rename $ptp_file_name $tmp_file_name
set ifile [open $tmp_file_name r]
set ofile [open $ptp_file_name w]
puts $ofile "%"
global mom_part_name
#puts $ofile "(Part: $mom_part_name)"
global mom_date
set datee [clock format [clock seconds] -format "%Y/%m/%d %H:%M /%w"]
puts $ofile "($datee)"


global mom_output_file_basename



#puts $ofile "(NC name: $mom_output_file_basename.nc)"



global mom_machine_time
puts $ofile "(Machine time: [format "%.2f" $mom_machine_time] MIN)"
#puts $ofile "(Writer: Mr.Zhang   Mobile:15853875606)"
global toollist

if { [info exists toollist] } {
    foreach tool $toollist {
        puts $ofile "($tool)"
    }
}

set buf ""
while { [gets $ifile buf] > 0 } {
puts $ofile $buf
}
close $ifile
close $ofile
MOM_remove_file $tmp_file_name
MOM_open_output_file $ptp_file_name

global mom_fixture_offset_value
if {$mom_fixture_offset_value>5} {
MOM_output_literal "G00G90G54.1P[expr $mom_fixture_offset_value-5]"
} else {
MOM_output_literal "G00G90G[expr $mom_fixture_offset_value+54]"
}


global toollist mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_number

set mom_tool_number [format "%02.0f" $mom_tool_number]

set tool_mes  [format "%-10s %-15s %-15s"  T$mom_tool_number=$mom_tool_name D=[ format  "%.2f" $mom_tool_diameter ] R=[ format  "%.2f" $mom_tool_corner1_radius ] ]

#if { ![info exists toollist] } {
#  set toollist $tool_mes
#} else {
lappend toollist $tool_mes
#}
set outputthd 1
global toollist  mom_tool_cutcom_register mom_cutcom_adjust_register mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_adjust_register mom_tool_adj_reg_defined mom_tool_number
set tdi [ format  "%.2f" $mom_tool_diameter]
set tr [ format  "%.2f" $mom_tool_corner1_radius]

if [info exists mom_tool_number] {
    set tt $mom_tool_number
} else {
    set tt 0
}
if [info exists mom_tool_adj_reg_defined] {
    set th $mom_tool_adjust_register
} else {
    set th 0
}
if [info exists mom_tool_adj_reg_defined] {
    set td $mom_tool_cutcom_register
} else {
    set td 0
}
set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]

set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]

if {$outputthd == 1 } {
    #MOM_output_literal "(T$tt:$mom_tool_name D=$tdi R=$tr H$th D$td)"
} else {
    #MOM_output_literal "(T00:$mom_tool_name D=$tdi R=$tr H00 D$00)"
}
global toollist  max_z min_z  mom_tool_number mom_tool_name
global toollist mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_number
set zmax [ string trimright [ format %.2f $max_z ]mm 0 ]
set zmin [ string trimright [ format %.2f $min_z ]mm 0 ]
set mom_tool_number [format "%02.0f" $mom_tool_number]

set tool_mes  [format "%-8s %-8s %-8s"  T$mom_tool_number:$mom_tool_name D=[ format  "%.2f" $mom_tool_diameter ] R=[ format  "%.2f" $mom_tool_corner1_radius ]\ \ \H$th\ \ \D$td\ \ \MaxZ=[ format %.2f $max_z ]mm\ \ \MinZ=[ format %.2f $min_z ]mm ]







#if { ![info exists toollist] } {
#  set toollist $tool_mes
#} else {
lappend toollist $tool_mes
#}

global ptp_file_name
set tmp_file_name "${ptp_file_name}_"
if {[file exists $tmp_file_name]} {
MOM_remove_file $tmp_file_name
}
MOM_close_output_file $ptp_file_name
file rename $ptp_file_name $tmp_file_name
set ifile [open $tmp_file_name r]
set ofile [open $ptp_file_name w]

global  max_z min_z  mom_tool_number mom_tool_name
set zmax [ string trimright [ format %.2f $max_z ]mm 0 ]
set zmin [ string trimright [ format %.2f $min_z ]mm 0 ]
puts $ofile "([format "%-10s %-15s %-15s" T$mom_tool_number=$mom_tool_name MaxZ=[ format %.2f $max_z ]mm   MinZ=[ format %.2f $min_z ]mm ])"



set buf ""
while { [gets $ifile buf] > 0 } {
puts $ofile $buf
}
close $ifile
close $ofile
MOM_remove_file $tmp_file_name
MOM_open_output_file $ptp_file_name

1

主题

572

回帖

9364

积分

少校

积分
9364
发表于 2016-11-26 15:11:53 | 显示全部楼层
谢谢分享

3

主题

223

回帖

1114

积分

六级士官

积分
1114
发表于 2016-12-7 14:37:19 | 显示全部楼层
拿来学习学习啦!

0

主题

72

回帖

689

积分

三级士官

积分
689
发表于 2016-12-7 16:54:54 | 显示全部楼层
cnbcn

0

主题

72

回帖

689

积分

三级士官

积分
689
发表于 2016-12-7 16:54:57 | 显示全部楼层
cnbcn
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-1-11 21:52

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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