LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Using Multiple NI-DAQmx Tasks

Solved!
Go to solution

Hi,

I am trying to write data into 2 Analog output (AO0, AO1) channels simultaneously using NI PCIe-6323 DAQ.

I am using 2 counters to generate output pulses.
Counter-0 generates pulses at 30KHz to operate channel AO-0, and 

Counter-1 generates pulses at 30 Hz to operate channel AO-1.

 

Have been repeatedly encountering this error, I believe, in lay man terms, it means that the device is not able to access both the channels simultaneously. 

 

I've tried several solutions I've found in the forum related to this but still can't get it. 

 

Would be glad if someone could help me correct this attached VI ? 

 

Thank You.

 

 

Error_message.jpg

 

Download All
0 Kudos
Message 1 of 3
(2,028 Views)

Hi,

Device is able to access both the Analog output channels simultaneously.As two Analog out channels are used the update rate will be less as mentioned in specification.Since it is a triggered generation ,can you please first start the Counter task and then task the AO task by wiring the Counter start task error out to AO start task error in.

 

 

 
 

 

 

Regards,
Srikrishna


0 Kudos
Message 2 of 3
(1,991 Views)
Solution
Accepted by yp96

Your device (like most other NI DAQ devices I'm familiar with) only has 1 timing engine available for AO.  This means that only 1 AO task can be hardware-clocked at a time.

 

The simplest workaround for your problem description is to put both AO channels into the same task and run it at 30 kHz.  Along the way, you need to replace every intended 30 Hz sample on the one channel with 1000 copies of the same value.  This will make it act like it would have with fewer samples at 30 Hz.

 

A quick look at your embedded data just now shows that you may have already tried to do something like that, though your step changes are every 1024 samples.   If you go with the data you have, and output both channels in a single task at 30 kHz, then the slower channel will be stepping its values at 30000/1024 = 29.3 Hz.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 3
(1,948 Views)