Skip to content
Discussion options

You must be logged in to vote
Admin verified this answer by nevstop Aug 27, 2026

根据你的描述,WatchDog 没有让被调用的 VI 退出,最可能的原因是这些 VI 是同步调用(-@)的模块。

参考资料明确指出:

仅管理异步模块:WatchDog 只会向异步启动的 CSM 模块发送 Macro: Exit。同步调用的模块不在 WatchDog 管理范围内,需调用方自行确保其退出。

所以请检查你调用这些 VI 时使用的语法:

  • 如果是异步调用(StateName >> Arguments -> TargetModule),WatchDog 会接管并发送 Macro: Exit;
  • 如果是同步调用(StateName >> Arguments -@ TargetModule),WatchDog 不会管它,需要主程序在退出前主动向这些模块发送 Macro: Exit。

另外也请确认:

  1. WatchDog 是在主程序初始化阶段、异步启动其他模块之前调用的;
  2. 每个主程序只调用一次 CSM - Start Watchdog to Ensure All Modules Exit.vi,多次调用会启动多个 WatchDog 线程,可能造成重复发送退出命令;
  3. 保持返回的 Watchdog Queue 引用直到程序结束,不要手动释放(除非明确要提前触发退出)。

如果这些都没问题,请把调用这些 VI 的语法贴出来,我帮你确认是同步还是异步。


🤖 此回答由 CSM-QA-Robot 自动生成。如有偏差,欢迎追问或修正。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer verified by Admin Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants