#include #include #include #include #include #define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else const uInt32 numberOfChannels=2; const char* physicalChannels[]={"Dev1/ai0","Dev1/ai1"}; const char* channels[]={"Channel0","Channel1"}; const float64 voltageMin[]={-10,-5}; const float64 voltageMax[]={10,5}; const uInt32 numberOfSamplesPerChannel=1000; int main(void) { int32 error=0; TaskHandle taskHandle=0; int32 numberOfSampsRead; int32 numberOfCoefficients=0; float64 average=0.0; int16 data[2000]; float64 scaledData[2000]; float64* coefficients; char errBuff[2048]={'\0'}; /*********************************************/ // DAQmx Configure Code /*********************************************/ DAQmxErrChk (DAQmxCreateTask("",&taskHandle)); for (uInt32 i=0; i