Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Use cDAQ9174 and NI9401 module to generate two double pulse waveforms

Solved!
Go to solution

Hi, all

I want to use NI9401 to achieve dual-channel double pulse output. My implementation is to add a channel 2 to the existing single-channel (channel 1) output that has been successful and use the same clock frequency and pulse logic. But in this case, an error message of error50103 will appear. How can I solve this problem? The program has been attached, please check and correct.

Many thanks

0 Kudos
Message 1 of 3
(1,181 Views)
Solution
Accepted by topic author zkli

Hi Zkli,

 

DAQmx Error 50103 states "Possible reason(s): The specified resource is reserved. The operation could not be completed as specified.". DAQmx reserves the module when you call it to create a task; you'll need to assign both channels on the same task. You can select multiple channels from one module by calling a series, e.g. "Dev1/port0/line0:1" or explicitly calling out the specific channels "Dev1/port0/line0, Dev1/port0/line1".

 

You'll need to change DAQmx Write to be Digital NChan NSamp and write an array, where each element in the array corresponds to a channel in the task.

 

Cheers,

Nick

0 Kudos
Message 2 of 3
(1,130 Views)

Hi Nick,

It works!

Thank you very much for your suggestions, I have already fixed this problem with your methods. 

 

Kind regards,

ZK

0 Kudos
Message 3 of 3
(1,096 Views)