06-23-2023 03:51 AM
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:
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
06-23-2023 04:04 AM
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…
06-23-2023 04:33 AM - edited 06-23-2023 04:34 AM
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
06-23-2023 08:46 AM
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.
06-26-2023 02:59 AM
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
06-26-2023 06:06 AM
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…