01-03-2012 04:31 AM
Hi,
I'm new to these forums and my hardware (NI USB-6351).
I'm trying to generate continuous pulse train by using DAQmx/VisualC++.
But I got the following error:
DAQmx error: "I/O type of the physical channel does not match the I/O type required for the virtual channel you are creating.
Physical Channel Name: ao0
Virtual Channel Name: Dev1/ao0
I/O Type Required for Virtual Channel: DAQmx_Val_CO
Task Name: pulse task
Status Code: -200430" char [2048]
the part of codes:
printError(DAQmxCreateTask("pulse task", &myPulseTask));
DAQmxErrChk (DAQmxCreateCOPulseChanFreq(myPulseTask, "Dev1/ao0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, 100, 0.50));
DAQmxErrChk (DAQmxCfgImplicitTiming(myPulseTask, DAQmx_Val_ContSamps, 1000));
01-03-2012 01:08 PM
Nesc,
You are creating a counter output task (DAQmxCreateCOPulseChanFreq), so this must be done with one of your 6351's counter channels rather than an analog output channel as you've specified (Dev1/ao0). The 6351 has 4 counters which could be used (Dev1/ctr0, Dev1/ctr1, Dev1/ctr2 and Dev1/ctr3).
Hope that helps,
Dan
01-03-2012 08:43 PM
Hi~ Mcdan,
Thanks for your suggestion, I really set an incorrect virtual channel. This problem has been done.
sincere regards~