Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQMx Error while generating a continuous pulse train

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));

 

 

 

 

Does someone please help me in resolving this problem?
 
Thanks,
 
Sincere regards
 
 
0 Kudos
Message 1 of 3
(2,939 Views)

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

0 Kudos
Message 2 of 3
(2,933 Views)

Hi~ Mcdan,

 

 Thanks for your suggestion, I really set an incorrect virtual channel. This problem has been done.

 

sincere regards~ 

0 Kudos
Message 3 of 3
(2,922 Views)