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.



當使用NI-DAQmx時,如何阻止記憶體崩潰



主要軟體:
主要軟體版本: 7.2
主要軟體修正版本: 7.0
次要軟體: LabVIEW Development Systems
硬體: Multifunction DAQ (MIO)

問題: 我要怎樣做才能在使用NI-DAQmx時,防止記憶體崩潰?

解答: 如果你在迴圈中初始化了DAQmx,但是卻沒有用到DAQmx Clear Task這個VI,那麼每次呼叫DAQMX都會再配置記憶體給它但是卻沒有釋放之前使用的記憶體。而使用DAQmx Clear Task這個VI則會釋放記憶體以避免記憶體崩潰。

 

附註:你可以藉由察看task manager的記憶體來發覺有沒有記憶體崩潰。或是當記憶體不足時,你會收到一封錯誤訊息。



相關連結: KnowledgeBase 2XDD7A7N: What is the Difference Between the DAQmx Stop Task.vi and DAQmx Clear Task.vi?
KnowledgeBase 2H2G13BS : Placing a Call By Reference Node in a Loop Creates a Memory Leak
KnowledgeBase 3FLFULK8 : Controls Property Node Leaks Memory
KnowledgeBase 31T899KD: How is the DAQmx Buffer Size Allocated for a Finite or Continuous Acquisition?

附加檔案:





報告日期: 05/17/2004
最後更新: 08/03/2007
文件偏號: 39G995DW