Quantcast
Channel: Measurement Studio for VC++ topics
Viewing all articles
Browse latest Browse all 654

DAQ to DAQmX problems with analog input sample rate

$
0
0

Hi,

 

I am trying to migrate a code from NiDAQ (legacy) to NiDAQmX and I am having a problem with the analog input.

I am using a PCI MIO 16e 1 (that has maximum adq. rate 1'25MHz).

 

Using NiDAQ (legacy) I read from two input chanels using:

 

i16 status = DAQ_Rate(m_AdqFM, POINT_SEG, &m_AdqBaseT, &m_AdqIntT);
SCAN_Setup(DEVICE, 2, m_AdqNumCanal, m_AdqGanCanal);
i16 status = SCAN_Start(DEVICE, rawDatai16, m_AdqNM * 2, m_AdqBaseT, m_AdqIntT, -1, 0);

 

 

where m_AdqFM = 1250000 and m_AdqNM = 500000.

 

Trying to do the same with NiDAQmX i use:

 

DAQmxCreateTask("adquisicion",&taskadq);
DAQmxCreateAIVoltageChan(taskadq,"Dev1/ai0:1","AnalogInput",DAQmx_Val_RSE,-10,10,DAQmx_Val_Volts,NULL);
DDAQmxCfgSampClkTiming(taskadq,"OnboardClock",m_AdqFM, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, m_AdqNM); 

 

Well, when executing the code i have the following error that I hadn't with NiDAQ (legacy) code.

 

ADC conversion attempted before the prior conversion was complete. Increase the period between ADC conversions. 

 

I've read that this is related to the acquisition sample rate, but I don't know why with NiDAQ (legacy) works and with NiDAQmX doesn't work.

What am I doing wrong?

 

Thanks. Marc

 

 

 


Viewing all articles
Browse latest Browse all 654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>