Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition of analog signal waits for pretrigger with Windows 7, and not with Win XP

Dear,

We have a problem with the acquisition of analog signals. Acquisition of analog signals keeps waiting for a

pretrigger (digital) signal with Windows 7 and not with Windows XP.

Used acquisition module : USB-6216 (BNC)

Trigger connected to PFI0.

Analog signals connected to AI0 and AI1.

Acquisition is done with a C++ program which uses the National Instruments Library.

Used calls are:

 

  • DAQmxCreateTask("",&taskHandle)
  • DAQmxCreateAIVoltageChan(taskHandle,dev.c_str(),"",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL)
  • DAQmxCfgSampClkTiming(taskHandle,"",sampleRate*1000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,this->expectedSampleCount)
  • DAQmxCfgDigEdgeRefTrig(taskHandle,"/Dev1/PFI0",DAQmx_Val_Rising,this->preTrigger)
  • DAQmxTaskControl(taskHandle,DAQmx_Val_Task_Commit)
  • DAQmxStartTask(taskHandle)
  • DAQmxReadAnalogF64(taskHandle,this->expectedSampleCount,timeOut,
  • DAQmx_Val_GroupByScanNumber,this->data,this->dataSize,&read,NULL)
  • DAQmxStopTask(taskHandle);
  • DAQmxClearTask(taskHandle)

 

Everything is running fine under Windows XP (single core), but for Windows 7 (dual core) we need to add a waiting time between a

DAQmxStartTask and a DAQmxReadAnalogF64.

Additionally, we clear the error -200281 and still we have a problem sometimes.

Does anyone have an idea what is going wrong? I have attached the code of the class.

 

Kind regards,

Ronny Comyn

Picanol

Belgium

Download All
0 Kudos
Message 1 of 2
(6,163 Views)

Hello Ronny_C,

 

Which version of the DAQmx driver are you using on both systems?

 

Can you provide me with a MAX Report of both systems?

http://digital.ni.com/public.nsf/allkb/271F252B4EF0A2E0862570E70056A1E4

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 2
(6,145 Views)