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.
|
您可以通過將您的LabVIEW VI製作為DLL的方式提升性能。主要性能的改善集中在TestStand使用VI的時候。如果您的VI在呼叫中間運行了很長時間,那麼您只能看到非常些微的改善。但是,如果您在一個迴圈中快速地呼叫VI,那麼根據記憶體中載入以及處理的方式,您能獲得高達3倍的性能改善。
為了製作一個DLL並在TestStand中呼叫,您需要進行下面的步驟:
1. 在LabVIEW中:編輯您的VI使其介面端包含了您需要從TestStand傳遞的參數。
注意:如果您的VI從引擎中使用讀/寫參數,DLL方式所帶來的大部分速度提升將損失。可以嘗試通過DLL函數呼叫及傳遞所有的輸入/輸出變數,而不是傳遞序列上下文(sequence context)並使用Get Property Value VI。
2. 製作DLL(這需要LabVIEW專業版)
3. 在TestStand中搜尋利用LabVIEW DLL轉接器(Adaptor)中呼叫VI的所有步驟,並將它們改變為C/C++ DLL轉接器(Adaptor)中。參考下面的相關鏈結,該鏈結給出一個範例,允許您改變轉接器(Adaptor)中類型而不會丟失步驟屬性。
|