为了正常的体验网站,请在浏览器设置里面开启Javascript功能!
首页 > ug后处理定制的命令

ug后处理定制的命令

2020-04-28 2页 doc 39KB 157阅读

用户头像 机构认证

金水文库

鑫淼网络科技有限公司主要经营:PPT设计 、课件制作,软文策划、合同简历设计、计划书策划案、各类模板等。公司秉着用户至上的原则服务好每一位客户

举报
ug后处理定制的命令______________________________________________________________________________________________________________在pd_cmd_custom_command(用户自定义)——定义命令1.在程序的末尾加上加工的时间(注意字符间的空格,不能少也不能多)globalmom_machine_timeMOM_output_literal(运行时间:[format%.2f$mom_machine_time]分...
ug后处理定制的命令
______________________________________________________________________________________________________________在pd_cmd_custom_command(用户自定义)——定义命令1.在程序的末尾加上加工的时间(注意字符间的空格,不能少也不能多)globalmom_machine_timeMOM_output_literal(运行时间:[format%.2f$mom_machine_time]分钟)最后效果:(运行时间:0.76分钟)2.在程序末尾加上生成程序的时间globalmom_date/u4?(C9](t,N6S:Z6Uwww.CAxHome.comMOM_output_literal";dateis:$mom_date"最后效果:;dateis:SatJun0119:38:4420133.加入刀具列表#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"pb_post_tool_list.tpl"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"GROUP_BY_TYPE".#globalmom_sys_tool_list_initializedglobalmom_sys_tool_list_output_typeif{![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.##"ORDER_IN_USE"-Listtoolsusedintheprogramintheorderofoperations.#"ALL_UNIQUE"-Listalluniquetoolsonceforeachintheorderofuse.#"GROUP_BY_TYPE"-Listtoolsingroupsofdifferenttooltypes.##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#setmom_sys_tool_list_output_type"ORDER_IN_USE"#setmom_sys_tool_list_output_type"ALL_UNIQUE"setmom_sys_tool_list_output_type"GROUP_BY_TYPE"globalmom_sys_control_outmom_sys_control_inglobalcurrent_program_nameglobalmom_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_nameif[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.tplglobaltcl_platformif[stringmatch"windows"$tcl_platform(platform)]{setpb_lib_misc_dir[MOM_ask_env_varUGII_BASE_DIR]\\postbuild\\pblib\\misc\\}else{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}}else{MOM_output_to_listing_device"ERROR:Templatefilepb_post_tool_list.tplisnotfoundinthefollowingdirectories:\n\n$pb_lib_misc_dir\n$cam_post_dir\n$cam_shop_doc_dir\n\nToollistcannotbegenerated.\n"return}#------------------#Toollistheader#------------------shop_doc_output_literal"$co===============================================================================================$ci"shop_doc_output_literal"$coTOOLLIST$ci"shop_doc_output_literal"$co===============================================================================================$ci"#------------------#Outputtoollist#------------------globaltool_data_bufferglobalmom_sys_tool_stackswitch$mom_sys_tool_list_output_type{"ORDER_IN_USE"{settool_list$mom_sys_tool_stack(IN_USE)}"GROUP_BY_TYPE"{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)!=""}{shop_doc_output_literal"$tool_data_buffer($tool_type,header)"}}if[infoexiststool_data_buffer($tool,output)]{shop_doc_output_literal"$tool_data_buffer($tool,output)"}setprev_tool_type$tool_type}#------------------#Toollistfooter#------------------shop_doc_output_literal"$co===============================================================================================$ci"#-------------------------------------------------------------------------------#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_lengthMOM_output_literal"(T_N:$mom_tool_nameT_D:[format"%.2f"$mom_tool_diameter]T_R:[format"%.2f"$mom_tool_corner1_radius]T_NO.:$mom_tool_numberT_L:[format"%.2f"$mom_tool_length]T_F_L:[format"%.2f"$mom_tool_flute_length])"效果:(T_N: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)”WelcomeToDownload!!!欢迎您的下载,资料仅供参考!精品资料
/
本文档为【ug后处理定制的命令】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索