Hello
I am developping a acquisition software for two NI PCI-6229 (only simulated into Max for the moment) under Visual Studio 2005.
I have configured two analog acquisition tasks on the 2 devices separatly (different handle...etc) with several thermocouple channels.
The initialisation and the launching of the task seem to work fine. But when i want to read my values, it works on the first device but not on the second one. It says me that my task has not been started.
"Measurements: No data is available to read, because no acquisition has been started.
Start the acquisition before attempting to read data, either explicitly or by enabling auto start and stop.
Task Name: _unnamedTask<4>
Status Code: -200286" char [2048]"
The funny thing of the problem, is that everything goes right when i add a classical analogical channel in my tasks. I can't get my values simulated by Max.
Is there anything that can explain such a strange behaviour?
Thank you
DanY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Code extracted from my application:
//Configuration
DAQmxErrChk(DAQmxCreateTask("",&thAcqAna))
if(Ana)
DAQmxErrChk(DAQmxCreateAIVoltageChan (thAcqAna, strNomVoie, "",iTabConfig[VoieTemp.m_nConfig],
VoieTemp.m_flMin,VoieTemp.m_flMax,DAQmx_Val_Volts,NULL))
if(Temp)
DAQmxCreateAIThrmcplChan (thAcqAna, strNomVoie, "",VoieTemp.m_flMin,VoieTemp.m_flMax,
DAQmx_Val_DegC,m_nTypeThermo,DAQmx_Val_BuiltIn,0.0,"")
DAQmxErrChk(DAQmxCfgSampClkTiming(thAcqAna,"",RATE_ACQ_NI,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1));
//Starting the task
DAQmxErrChk(DAQmxStartTask(thAcqAna));
//Reading the values
DAQmxErrChk(DAQmxSetReadAttribute (thAcqAna, DAQmx_Read_RelativeTo,
DAQmx_Val_MostRecentSamp))
DAQmxErrChk(DAQmxReadAnalogF64(thAcqAna,1,1.0,DAQmx_Val_GroupByChannel,&(*m_pfMesuresAna.begin()), <- get the error here
m_pfMesuresAna.size(),&nNbMesLu,NULL))