如何立即跳出一個Wait時間設定很長的迴圈

如何立即跳出一個Wait時間設定很長的迴圈

我發現即使我已將回圈內的停止條件端觸發

但迴圈仍會等待最後一次才跳離

但比如我的Wait設為40秒 那不就最少要等40秒才離開嗎

試試停止條件條件成立時,執行STOP function.記得BOOL輸入給此功能要TRUE.詳細說明如下.

Stop Function

Owning Palette: Application Control VIs and Functions

Requires: Base Development System

Stops the VI in which it executes, just as if you clicked the Abort Execution button on the toolbar. Before you call this function with a TRUE input, be sure to complete all final tasks for the VI first, such as closing files, setting safe values for devices being controlled, and so on.

If you wired the input, stop occurs only if the input value is TRUE. The default is to stop as soon as the node that is currently executing finishes.

你應該用計時的方式,如果使用Wait就只能等到wait結束,如果使用計時或停止條件觸發設為or的話只要其中一個條件成立就會終止迴圈