西门子多轴后处理错误
请大家帮我看一下,这个后处理咋办啊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
西门子多轴后处理错误
本帖最后由 topckey 于 2025-7-25 08:18 编辑
:lol结合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]