




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.在pd_cmd_custom_command(用户自定义)定义命令1.在程序的末尾加上加工的时间(注意字符间的空格,不能少也不能多)global mom_machine_timeMOM_output_literal (运行时间: format %.2f $mom_machine_time分钟)最后效果:(运行时间:0.76分钟)2.在程序末尾加上生成程序的时间global mom_date/u4?(C9(t,N6S:Z6Uwww.CAxHMOM_output_literal ;date is :$mom_date最后效果:;date is :Sat Jun 01 19:38:4
2、4 20133. 加入刀具列表# Place this custom command in either the start of program# or the end of program event marker to generate a tool list# in your NC file.# The Shop Doc template file pb_post_tool_list.tpl distributed with# Post Builder in POSTBUILD/pblib/misc directory can be copied# to the mach/resour
3、ce/postprocessor or mach/resource/shop_docs directory,# in case that your UG runtime environment does not have access to the# Post Builder installation.# Accessing pb_post_tool_list.tpl in other location can also be accomplished# by changing the code below titled Generate tool list data in this proc
4、.# The variable mom_sys_tool_list_output_type set in this proc allows you# to select the type of tool list to be generated.# The options are:# ORDER_IN_USE - List tools used in the program in the order of operations.# ALL_UNIQUE - List all unique tools once for each in the order of use.# GROUP_BY_TY
5、PE - List tools in groups of different tool types.# The desired tool list type can be set by changing the code below.# The default is set to GROUP_BY_TYPE.# global mom_sys_tool_list_initialized global mom_sys_tool_list_output_type if !info exists mom_sys_tool_list_initialized | !$mom_sys_tool_list_i
6、nitialized MOM_output_to_listing_device proc PB_CMD_init_tool_list must be executed in the Start of Program before PB_CMD_create_tool_list is called.return #+ # Set mom_sys_tool_list_output_type to the desired output fashion. # # ORDER_IN_USE - List tools used in the program in the order of operatio
7、ns. # ALL_UNIQUE - List all unique tools once for each in the order of use. # GROUP_BY_TYPE - List tools in groups of different tool types. # #+ # set mom_sys_tool_list_output_type ORDER_IN_USE # set mom_sys_tool_list_output_type ALL_UNIQUE set mom_sys_tool_list_output_type GROUP_BY_TYPE global mom_
8、sys_control_out mom_sys_control_in global current_program_name global mom_tool_number mom_tool_length_adjust_register mom_tool_name #- # Save info for the currently active tool in the program being post-prcessed # before starting Shop Doc mechanism for tool list generation. #- if llength info comman
9、ds PB_CMD_save_active_oper_tool_data PB_CMD_save_active_oper_tool_data #- # Create tool list per selected top-level group. # Group name is set to blank if no group has been selected. #- global mom_parent_group_name if info exists mom_parent_group_name set current_program_name $mom_parent_group_name
10、else set current_program_name set ci set co if info exists mom_sys_control_in set ci $mom_sys_control_in if info exists mom_sys_control_out set co $mom_sys_control_out #* # Generate tool list data #* set template_file pb_post_tool_list.tpl global tcl_platform if string match windows $tcl_platform(pl
11、atform) set pb_lib_misc_dir MOM_ask_env_var UGII_BASE_DIRpostbuildpblibmisc else set pb_lib_misc_dir MOM_ask_env_var UGII_BASE_DIR/postbuild/pblib/misc/ set cam_post_dir MOM_ask_env_var UGII_CAM_POST_DIR set cam_shop_doc_dir MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR if file exists $pb_lib_misc_dir$templ
12、ate_file MOM_do_template_file $pb_lib_misc_dir$template_file elseif file exists $cam_post_dir$template_file MOM_do_template_file $cam_post_dir$template_file elseif file exists $cam_shop_doc_dir$template_file MOM_do_template_file $cam_shop_doc_dir$template_file else MOM_output_to_listing_device ERROR
13、 : Template file pb_post_tool_list.tpl is not found in the following directories: n n $pb_lib_misc_dir n $cam_post_dir n $cam_shop_doc_dir n n Tool list cannot be generated.nreturn #- # Tool list header #- shop_doc_output_literal $co=$ci shop_doc_output_literal $co T O O L L I S T $ci shop_doc_outpu
14、t_literal $co=$ci #- # Output tool list #- global tool_data_buffer global mom_sys_tool_stack switch $mom_sys_tool_list_output_type ORDER_IN_USE set tool_list $mom_sys_tool_stack(IN_USE) GROUP_BY_TYPE set tool_list concat $mom_sys_tool_stack(LATHE) $mom_sys_tool_stack(DRILL) $mom_sys_tool_stack(MILL)
15、 default set tool_list $mom_sys_tool_stack(ALL) set prev_tool_type foreach tool $tool_list set tool_type $tool_data_buffer($tool,type) # Output tool type header if it changes. if !string match $tool_type $prev_tool_type if info exists tool_data_buffer($tool_type,header) & $tool_data_buffer($tool_typ
16、e,header) != shop_doc_output_literal $tool_data_buffer($tool_type,header) if info exists tool_data_buffer($tool,output) shop_doc_output_literal $tool_data_buffer($tool,output) set prev_tool_type $tool_type #- # Tool list footer #- shop_doc_output_literal $co=$ci #- # Restore info for the currently a
17、ctive tool in the program being post-prcessed. #- if llength info commands PB_CMD_restore_active_oper_tool_data PB_CMD_restore_active_oper_tool_data 结果:(=)( T O O L L I S T )(=)( )(-)(MILL DESCRIPTION DIAMETER COR RAD FLUTE LEN ADJ REG MACH TIME )(-)(D10 MILL 10.0000 0.0000 50.0000 0 0.16 )(D6R3 MIL
18、L 6.0000 3.0000 50.0000 0 0.20 )(D4 MILL 4.0000 0.0000 50.0000 0 0.23 )(=)5. 插入刀具详细信息global mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_tool_number mom_tool_length mom_tool_flute_length MOM_output_literal (T_N:$mom_tool_name T_D: format %.2f $mom_tool_diameter T_R: format %.2f $mom_tool_corner1_radius T_NO.:$mom_tool_number T_L: format
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 尊重英雄班会课件
- 尊重他人说课课件
- 产业园区人才引进与培养合作协议
- 阿里巴巴商家品牌代运营合作协议书
- 因家庭矛盾解除婚约彩礼退还及财产分割协议
- 离婚协议补充协议书签订要点流程与法律风险防范
- 2024-2025学年浙江省金华市卓越联盟高一下学期5月月考政治试题及答案
- 毛笔教学flash课件
- 传感器在公共场所安全监控中的应用考核试卷
- 智能健身器材智能健身房管理与预约系统考核试卷
- 2025年 武汉市汉阳区社区干事岗位招聘考试笔试试卷附答案
- 2025年 云南省危险化学品经营单位安全管理人员考试练习题附答案
- 美发师五级试题及答案
- Q-GDW10250-2025 输变电工程建设安全文明施工规程
- 2024-2025学年四年级(下)期末数学试卷及答案西师大版2
- 2025-2030年中国钕铁硼永磁材料行业市场现状供需分析及投资评估规划分析研究报告
- 2025-2030年中国高导磁芯行业深度研究分析报告
- 宣城市宣州区“政聘企培”人才引进笔试真题2024
- 远程胎心监护数据解读
- 技术异化的解放路径-洞察及研究
- 2025年全国法医专项技术考试试题及答案
评论
0/150
提交评论