ug后处理定制的命令Word文档格式.docx

上传人:b****2 文档编号:1540251 上传时间:2023-04-30 格式:DOCX 页数:8 大小:16.41KB
下载 相关 举报
ug后处理定制的命令Word文档格式.docx_第1页
第1页 / 共8页
ug后处理定制的命令Word文档格式.docx_第2页
第2页 / 共8页
ug后处理定制的命令Word文档格式.docx_第3页
第3页 / 共8页
ug后处理定制的命令Word文档格式.docx_第4页
第4页 / 共8页
ug后处理定制的命令Word文档格式.docx_第5页
第5页 / 共8页
ug后处理定制的命令Word文档格式.docx_第6页
第6页 / 共8页
ug后处理定制的命令Word文档格式.docx_第7页
第7页 / 共8页
ug后处理定制的命令Word文档格式.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

ug后处理定制的命令Word文档格式.docx

《ug后处理定制的命令Word文档格式.docx》由会员分享,可在线阅读,更多相关《ug后处理定制的命令Word文档格式.docx(8页珍藏版)》请在冰点文库上搜索。

ug后处理定制的命令Word文档格式.docx

442013

3.加入刀具列表

#Placethiscustomcommandineitherthestartofprogram

#ortheendofprogrameventmarkertogenerateatoollist

#inyourNCfile.

#

#TheShopDoctemplatefile"

pb_post_tool_list.tpl"

distributedwith

#PostBuilderin"

POSTBUILD/pblib/misc"

directorycanbecopied

#tothe"

mach/resource/postprocessor"

or"

mach/resource/shop_docs"

directory,

#incasethatyourUGruntimeenvironmentdoesnothaveaccesstothe

#PostBuilderinstallation.

#Accessing"

inotherlocationcanalsobeaccomplished

#bychangingthecodebelowtitled"

Generatetoollistdata"

inthisproc.

#Thevariable"

mom_sys_tool_list_output_type"

setinthisprocallowsyou

#toselectthetypeoftoollisttobegenerated.

#Theoptionsare:

#"

ORDER_IN_USE"

-Listtoolsusedintheprogramintheorderofoperations.

ALL_UNIQUE"

-Listalluniquetoolsonceforeachintheorderofuse.

GROUP_BY_TYPE"

-Listtoolsingroupsofdifferenttooltypes.

#Thedesiredtoollisttypecanbesetbychangingthecodebelow.

#Thedefaultissetto"

.

globalmom_sys_tool_list_initialized

globalmom_sys_tool_list_output_type

if{!

[infoexistsmom_sys_tool_list_initialized]||!

$mom_sys_tool_list_initialized}{

MOM_output_to_listing_device"

procPB_CMD_init_tool_listmustbeexecutedintheStartofProgrambeforePB_CMD_create_tool_listiscalled."

return

}

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Setmom_sys_tool_list_output_typetothedesiredoutputfashion.

#

#"

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#setmom_sys_tool_list_output_type"

setmom_sys_tool_list_output_type"

globalmom_sys_control_outmom_sys_control_in

globalcurrent_program_name

globalmom_tool_numbermom_tool_length_adjust_registermom_tool_name

#----------------------------------------------------------------------------

#Saveinfoforthecurrentlyactivetoolintheprogrambeingpost-prcessed

#beforestartingShopDocmechanismfortoollistgeneration.

if[llength[infocommandsPB_CMD_save_active_oper_tool_data]]{

PB_CMD_save_active_oper_tool_data

#-----------------------------------------------------------

#Createtoollistperselectedtop-levelgroup.

#Groupnameissettoblankifnogrouphasbeenselected.

globalmom_parent_group_name

if[infoexistsmom_parent_group_name]{

setcurrent_program_name$mom_parent_group_name

}else{

setcurrent_program_name"

"

setci"

"

setco"

if[infoexistsmom_sys_control_in]{setci$mom_sys_control_in}

if[infoexistsmom_sys_control_out]{setco$mom_sys_control_out}

#*************************

#Generatetoollistdata

settemplate_filepb_post_tool_list.tpl

globaltcl_platform

if[stringmatch"

windows"

$tcl_platform(platform)]{

setpb_lib_misc_dir[MOM_ask_env_varUGII_BASE_DIR]\\postbuild\\pblib\\misc\\

setpb_lib_misc_dir[MOM_ask_env_varUGII_BASE_DIR]/postbuild/pblib/misc/

setcam_post_dir[MOM_ask_env_varUGII_CAM_POST_DIR]

setcam_shop_doc_dir[MOM_ask_env_varUGII_CAM_SHOP_DOC_DIR]

if{[fileexists${pb_lib_misc_dir}${template_file}]}{

MOM_do_template_file${pb_lib_misc_dir}${template_file}

}elseif{[fileexists${cam_post_dir}${template_file}]}{

MOM_do_template_file${cam_post_dir}${template_file}

}elseif{[fileexists${cam_shop_doc_dir}${template_file}]}{

MOM_do_template_file${cam_shop_doc_dir}${template_file}

ERROR:

Templatefilepb_post_tool_list.tplisnotfoundinthefollowingdirectories:

\n\n$pb_lib_misc_dir\n$cam_post_dir\n$cam_shop_doc_dir\n\nToollistcannotbegenerated.\n"

#------------------

#Toollistheader

shop_doc_output_literal"

$co===============================================================================================$ci"

$coTOOLLIST$ci"

#Outputtoollist

globaltool_data_buffer

globalmom_sys_tool_stack

switch$mom_sys_tool_list_output_type{

{

settool_list$mom_sys_tool_stack(IN_USE)

settool_list[concat$mom_sys_tool_stack(LATHE)$mom_sys_tool_stack(DRILL)$mom_sys_tool_stack(MILL)]

default{

settool_list$mom_sys_tool_stack(ALL)

setprev_tool_type"

foreachtool$tool_list{

settool_type$tool_data_buffer($tool,type)

#Outputtooltypeheaderifitchanges.

if{!

[stringmatch"

$tool_type"

$prev_tool_type]}{

if{[infoexiststool_data_buffer($tool_type,header)]&

&

$tool_data_buffer($tool_type,header)!

="

}{

$tool_data_buffer($tool_type,header)"

}

if[infoexiststool_data_buffer($tool,output)]{

$tool_data_buffer($tool,output)"

setprev_tool_type$tool_type

#Toollistfooter

#-------------------------------------------------------------------------------

#Restoreinfoforthecurrentlyactivetoolintheprogrambeingpost-prcessed.

if[llength[infocommandsPB_CMD_restore_active_oper_tool_data]]{

PB_CMD_restore_active_oper_tool_data

结果:

(===============================================================================================)

(TOOLLIST)

()

(-----------------------------------------------------------------------------------------------)

(MILLDESCRIPTIONDIAMETERCORRADFLUTELENADJREGMACHTIME)

(D10MILL10.00000.000050.000000.16)

(D6R3MILL6.00003.000050.000000.20)

(D4MILL4.00000.000050.000000.23)

5.插入刀具详细信息

globalmom_tool_namemom_tool_diametermom_tool_corner1_radiusmom_tool_numbermom_tool_lengthmom_tool_flute_length

MOM_output_literal"

(T_N:

$mom_tool_nameT_D:

[format"

%.2f"

$mom_tool_diameter]T_R:

$mom_tool_corner1_radius]T_NO.:

$mom_tool_numberT_L:

$mom_tool_length]T_F_L:

$mom_tool_flute_length])"

效果:

D10T_D:

10.00T_R:

0.00T_NO.:

1T_L:

75.00T_F_L:

50.00)

 

在运算程序消息

1.MOM_output_literal“(刀具名称:

$mom_tool_name)”

2.MOM_output_literal“(刀具直径:

$mom_tool_diameter)”

3.MOM_output_literal“(刀具R角半径:

$mom_tool_nose_radius)”

(注:

可编辑下载,若有不当之处,请指正,谢谢!

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 求职职场 > 简历

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2