From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
在TestStand中,常常需要程序判断在某个测试步骤失败的时候中止执行序列。特别是在该测试是必测项或是关系到生产线的运行安全时尤其必要。那么如何能在步骤失败的时候程序判断中止执行呢?
有两种办法可以解决该问题,如果你使用TestStand 2.0.或更新版本TestStand,两种办法都可以,如果使用TestStand 1.0.3或者更老的版本,那么就只有第一种办法可行了。下面是这两种解法的详细步骤。因为这两中解法都使用回调,所以他们可以被单独用在client sequence里或用在process model里面来影响所有使用该model的sequence。
使用PostStep回调(TestStand 1.0.x):
使用PostStepFailure回调(TestStand 2.0 或更高版本):
注意:对于上述两种解法,一种简单的改进办法是根据用户的输入来决定是否中止。比如,考虑下在ActiveX调用之前弹出一个消息框让用户选择是否接受错误或者中止序列执行。用户选择的结果可以被作为该步骤的附加先决条件。另外一个改进办法是可以选择除了“Abort(中止)”之外的其他操作。请查阅用户手册关于"Abort," "Terminate" 和"Break"之间的不同点来决定哪一种操作更适合您的执行序列。
About the TestStand Process Models
Product Manuals: TestStand User Manual (March 2001)
KnowledgeBase 2LT9BI6E: What is the Difference Between Using a "SequenceFile..." callback and a "ProcessModel..." callback?
|