LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Generation task on two channel

Hi,

 

I have a TS sequence which call two different VI (here attached) for generating Audio on two different Channel of a NI USB-6211 device. When I call them in two different threads, the second vi launched stops with a pop-up saying that the resource is already occupied. Now on the Net I have found:

https://forums.ni.com/t5/LabVIEW/2-Digital-Pulses-on-Different-Physical-Channels-with-USB-6211/td-p/...

In which the problem is addressed to the fact that with two different task I’m trying to control two different channels, but I’m not sure about this explanation. Also, because if I create the same situation for two digital channels and the problem doesn’t happen.

So, am I missing something?

 

Thank you for the help!

 

Best Regards,

Zuc

Download All
0 Kudos
Message 1 of 6
(1,026 Views)

Hi Zuc,

 


@Zuc_Lab wrote:

I have a TS sequence which call two different VI (here attached) for generating Audio on two different Channel of a NI USB-6211 device. When I call them in two different threads, the second vi launched stops with a pop-up saying that the resource is already occupied.


I guess you try to output signals on the AO channels of the USB6211: have you tried to create a DAQmx task containing both channels? That's the usual way to output signals on several channels…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,021 Views)

Hi Gerd,

 

i know i can generate on both with the same task, but i need to set their start in different moment in the sequence and count the samples on each channel, i know that there will be a way to do that. But my curiosity is about understanding why it happens for AO channels and not for digital nes. What is the difference and how does USB6211 work? I want to understand that in order to avoid future errors and/or find the best way out.

 

Best Regards,

Zuc

0 Kudos
Message 3 of 6
(1,008 Views)

Because i have tried to commutate also the NChannelNsamples Write vi with the 1channelNsample one and when i run two vi on different analog channel with different task after few seconds they show the eroor on the resources. It seems like the two USB6211 analog channels aren't indipendent at all.

0 Kudos
Message 4 of 6
(979 Views)

Hi,

 

I’m working on a USB-6211 with LabView 2021 and I’m trying to generate a sine wave on both the AO channels. I followed this links:

I don’t get why the only working way to generate on the channels is putting the DAQmx Create Virtual Channel (VI) in a loop and give it an array of channels. But when I started using LabVIEW and DAQmx functions, I was used to write channels as a range (i.e. Dev1/ao0:1) or create more virtual channels in series. When I run the VI with this second input the result is the error attached here. Why does it happen? Is it something that I miss in my vi or is it a limitation of my device?

 

Thank you for the help!

 

Best Regards,

Zuc

Download All
0 Kudos
Message 5 of 6
(980 Views)

Hi Zuc,

 


@Zuc_Lab wrote:

When I run the VI with this second input the result is the error attached here. Why does it happen?


Did you read the error message in your image?

 

When your task contains 2 channels and you want to write (new) data to the AO channels then you need to write data for both channels…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(950 Views)