From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I simultaneously put out two different signals (waveforms: audio left and audio right) with myDAQ ?

Hey,

 

I am generating two different signals. One for AudioOutput left and the other one for AudioOutput right. How can I simultaneously do that on myDAQ? I tried to create two different tasks, but you can only have one task running, while the other one got cleared out already. The signals got generated by basic_function_generator.vi

My error description is basically case 3 here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8kmSAC&l=de-AT

 

I posted my .vi in attachment, but it's mot finished. I just wanted to try, if I can put out two signals at the same time.

 

Can someone give me a tip on this please, how I can release that?

 

Download All
0 Kudos
Message 1 of 15
(2,688 Views)

First, delete half your code.

 

You can only have one task.  But in that task you can select multiple channels.

 

Click the down arrow on the physical channels control.  Hold down your control key and you can select multiple channels.

 

Also, get rid of all those local variables, you should be able to use wires from the original source of data.

0 Kudos
Message 2 of 15
(2,672 Views)

Thanks for the fast respond!

 

But I do not really understand, what you mean by "1. Click down arrow on the physical channel control. 2.Hold down your control key and you can select multiple channels". I did this in my front panel, but nothing happens.

 

Can you really put out two different signals with one task?

 

---------------------

Bit more about my project:
I uploaded a picture(it is a example, how it could look like. I do not have the actual code for it), which shows two physical channel selections. Basically it is about adding/superimposing signal 1-4 and putting them out to channel left or right, depending what I have checked. I only wrote the code in my start post to test how I can put out two different signals at the same time.

 

 

0 Kudos
Message 3 of 15
(2,653 Views)

I know I was thinking it, but I must have forgotten to type the part where you need to hit the "Browse..." menu choice when you hit the down arrow.

I'm sure you must have seen that one.

 

Then you get the dialog box where you can pick multiple channels

 

 

Capture

 

0 Kudos
Message 4 of 15
(2,644 Views)

Ah yes, that is possible! But how can I select which signal goes to which channel in the end? Because in my code did nothing change.

0 Kudos
Message 5 of 15
(2,636 Views)

They are in order.  So channel 0 comes before channel 1.

 

It is up to you to build the array of waveforms in the order you want them.

0 Kudos
Message 6 of 15
(2,633 Views)

So I have to put the two signals in an array and connect that to DAQmx Write?

 

And will it put the two signals out at the same time then?

0 Kudos
Message 7 of 15
(2,623 Views)

Yes.

 

Have you looked as the DAQmx examples in LabVIEW?

0 Kudos
Message 8 of 15
(2,604 Views)

Yes, I've read this: http://www.ni.com/product-documentation/2835/en/#toc7

 

Also, when I just select two outputs and without changing any code I get the error showed in the attachment. So apparently my device does not support two channels in one task? I have no idea what version it is, but it's from 2011.

 

0 Kudos
Message 9 of 15
(2,599 Views)

Maybe not.  I'm not familiar with the myDAQ.  Since it is a "student" device, perhaps it has some limitations.  Check the manual to see if it does, or ask your professor.

 

It would seem to be a strange limitation.  Why would a device provide 2 analog output channels if you weren't able to use both at the same time.

0 Kudos
Message 10 of 15
(2,585 Views)