Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200430

I am using USB-6008 and I keep getting error 200430 with the following code and I was curious as to why.  thank you very much for your help.
 

int

error=0;

int32 sampsPerChanRead;

bool

thread;

TaskHandle taskHandle=0;

// Analog Output

TaskHandle taskHandle1=0;

// Analog Input

TaskHandle taskHandle2=0;

// Digital Input

float64 data[10000];

float64 Range[3] ={1.5,4.0,9.9};

float64 temp[2000];

float64 trianglewave[1000];

float64 FlowData[1000];

char

errBuff[2048]={'\0'};

char

output[1000];

CPaintDC dc(

this);

CString str = "top";

char

tempstr[10];

int32 written;

int

i=0;

/*********************************************/

// Initialize Card

/*********************************************/

DAQmxResetDevice ("/Dev1/");

for(;i<1000;i++)

data[i] = 4.9*(

double)i/4000.0;

/*********************************************/

/*/ DAQmx Configure Code

/*********************************************/

DAQmxErrChk (DAQmxCreateTask("",&taskHandle));

DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev1/ai0","",-5.0,5.0,DAQmx_Val_Volts,NULL));

DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",1000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));

/*********************************************/

/*/ DAQmx Write Code

/*********************************************/

DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,1000,0,10.0,DAQmx_Val_GroupByChannel,data,&written,NULL));

/*********************************************/

/*/ DAQmx Start Code

/*********************************************/

DAQmxErrChk (DAQmxStartTask(taskHandle));

0 Kudos
Message 1 of 2
(5,142 Views)
Look at the type of channel you are creating (AOVoltageChannel) and the name of the channel (Dev1/ai0). You need to match CreateAOVoltageChan with channels named 'ao' and you need to match CreateAIVoltageChan with channels named 'ai'.
0 Kudos
Message 2 of 2
(5,129 Views)