找回密码
 立即注册

QQ登录

只需一步,快速开始

微信扫码登录

搜索
查看: 213|回复: 4

[求助] 西门子多轴后处理错误

[复制链接]

1

主题

0

回帖

7

积分

列兵

积分
7
发表于 前天 18:24 | 显示全部楼层 |阅读模式
请大家帮我看一下,这个后处理咋办啊


Set Debugging Options
Use default answers.
Answers: 1 0 1 0 0 0
***** A TCL Error Has Occurred *****
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

***ERROR***: Error in the Event Handler
---------------------------------------
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

Set Debugging Options
Use default answers.
Answers: 1 0 1 0 0 0
Set Debugging Options
Use default answers.
Answers: 1 0 1 0 0 0
***** A TCL Error Has Occurred *****
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

***ERROR***: Error in the Event Handler
---------------------------------------
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

Set Debugging Options
Use default answers.
Answers: 1 0 1 0 0 0
***** A TCL Error Has Occurred *****
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

***ERROR***: Error in the Event Handler
---------------------------------------
Event Handler: D:\UG2306\mach\resource\postprocessor\ZX-WX20240313.tcl
Event: MOM_before_motion
Error Info: invalid command name "mom_abort"
    while executing
"mom_abort "\n\n\n\n角度超程\n\n\n\n""
    (procedure "PB_CMD_custom_command_2" line 3)
    invoked from within
"PB_CMD_custom_command_2"
    (procedure "PB_user_defined_axis_limit_action" line 3)
    invoked from within
"PB_user_defined_axis_limit_action"
    (procedure "PB_ROTARY_AXIS_RETRACT" line 86)
    invoked from within
"PB_ROTARY_AXIS_RETRACT"
    (procedure "ROTARY_AXIS_RETRACT" line 12)
    invoked from within
"ROTARY_AXIS_RETRACT"
    (procedure "PB_CMD_kin_before_motion" line 55)
    invoked from within
"PB_CMD_kin_before_motion "
    (procedure "MOM_before_motion" line 16)
    invoked from within
"MOM_before_motion"
Error Code: TCL LOOKUP COMMAND mom_abort

西门子多轴后处理错误

西门子多轴后处理错误

西门子多轴后处理错误

66

主题

3995

回帖

3万

积分

上将

积分
33684

论坛元老

发表于 昨天 08:11 | 显示全部楼层
本帖最后由 topckey 于 2025-7-25 08:18 编辑

结合AI解答的内容
结合NX后处理的背景,这个错误的原因和解决方式可以进一步明确:在NX后处理中,`mom_abort`并不是NX默认提供的标准MOM(Manufacturing Output Manager)命令,这就是导致"TCL LOOKUP COMMAND mom_abort"错误的核心原因。


从报错信息来看,你的后处理脚本(ZX-WX20240313.tcl)在检测到"角度超程"时,试图通过`mom_abort`命令终止处理流程并提示错误,但NX后处理环境并不识别该命令。


**NX后处理中对应的正确做法**:
1. 使用NX标准的错误处理命令:   
```tcl   # 替代 mom_abort 的正确写法   


MOM_output_error_text "角度超程"   MOM_abort_post   ```   
- `MOM_output_error_text`:用于输出错误信息到日志  
- `MOM_abort_post`:用于终止后处理过程


2. 修改位置:   需要在`ZX-WX20240313.tcl`文件中找到`PB_CMD_custom_command_2`过程的第3行,将原来的`mom_abort`调用替换为上述标准命令


3. 额外建议:   - 检查是否有其他自定义命令也使用了非标准的MOM函数   - 可以参考NX安装目录下的标准后处理模板(通常在`UGII\MACH\resource\postprocessor`)中的错误处理方式   - 如果需要保留原有提示格式,可以写成:     
```tcl     MOM_output_error_text "\n\n\n\n角度超程\n\n\n\n"     
MOM_abort_post     


```这个问题本质上是后处理脚本中使用了不正确的NX MOM API导致的,替换为标准命令即可解决。


1

主题

22

回帖

3898

积分

中尉

积分
3898
发表于 昨天 08:40 | 显示全部楼层
看不懂,但觉得你们很牛!赞一个

4

主题

234

回帖

2268

积分

少尉

积分
2268
发表于 昨天 10:33 | 显示全部楼层
发出来学习下

0

主题

87

回帖

200

积分

一级士官

积分
200
发表于 13 小时前 | 显示全部楼层
不懂,坐等大神解决,看着像是语法错误。都是自定义的命令里面出现的错误的语句。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-7-26 20:22

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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