NI產品與技術 討論區

取消
顯示結果 
搜尋替代 
您的意思是: 

NI USB-4431 DAQ清除PC buffer

程式語言使用C#,sample channel為ai0與ai1,samplerate為4096,sample per channel為2048。

 

1. 由於4431啟動擷取大約需要3秒鐘,但應用上需要不間斷的擷取即時訊號,所以目前程式一開始即啟動DAQ擷取。

問題在於需要的資料在程式啟動後的某一特定時段,而不是程式一啟動後的所有資料,所以想請問在開始讀取需要的資料前,是否有C# API可以將PC上的Buffer先清空呢?

 

2. DAQ開始擷取後不久就會出現Attempted to read samples that are no longer available.錯誤,除了增加PC Buffer Size外,是否可設定CallBack的速度呢?

 

3. C#有API可以設定PC Buffer的Size,但不確定設定的單位為何?是否有文件說明? ex: 100代表100k?

0 積分
1 條訊息(共 8 條)
7,069 檢視

請提供

 

OS version

NI-DAQmx version

Visual Studio version

0 積分
2 條訊息(共 8 條)
7,063 檢視

資訊如下。

OS version:XP sp3

NI-DAQmx version:v9.40f1

Visual Studio version:C# 2010 Express

0 積分
3 條訊息(共 8 條)
7,059 檢視

請問您使用哪個範例改寫?

 

是否能提供程式碼?

0 積分
4 條訊息(共 8 條)
7,055 檢視

附件是程式碼,但不是從範例改寫。

參考的範例是ContAcqVoltageSamples_IntClk。

0 積分
5 條訊息(共 8 條)
7,048 檢視

請下載 ni-daqmx 9.5.1 試試

http://joule.ni.com/nidu/cds/view/p/id/2933/lang/zht

 

說明文件

開始>>程式集>>national instruments>>ni-daq>>ni-daqmx help

搜尋>>buffer

How Is Buffer Size Determined?

 

Error code: - 200279
Description:
 Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Possible cause: The application did not retrieve the data from the buffer fast enough, so the data was overwritten.
Solutions: Increasing the buffer size or reading the data more frequently may correct the problem.

 

單位 samples per channel


 

0 積分
6 條訊息(共 8 條)
7,043 檢視

由於我們使用C# .Net Framework 2.0,請問NationalInstruments.Common.dll使用9.1.20.159,NationalInstruments.Common.Native.dll使用9.1.20.159,NationalInstruments.DAQmx.dll使用9.4.20.50,配合ni-daqmx 9.5.1的driver,這樣ok嗎?

0 積分
7 條訊息(共 8 條)
7,036 檢視

不OK

 

請手動移除再加入

 

 

0 積分
8 條訊息(共 8 條)
7,032 檢視