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下,interactive loop index的值並沒有辦法直接來取得。有一個方法可以解決這樣的問題:使用step.GetSettingString()。在interactive execution時,這個方法會回傳如下格式的字串資料,其中X代表loop index的數值。
Interactive (X)
你需要針對這個字串資料作額外的處理才能將X的數值取出來。注意只有在迴圈次數大於1的狀態時,loop index的數值才會包含在step setting字串下。
這個方法需要一個指向step的reference輸入。你可以使用sequence context來獲取sequence的reference,接著進一步獲取step的reference。另外,InteactiveArgs物件會含有在interactive execution下的step引數值。下面有一個簡單的範例示範這個方法的使用。要使用這個範例,只需選取sequence中的所有steps,然後右鍵選取Loop on Selected Steps...。
|