07-02-2019 12:09 PM - edited 07-02-2019 12:10 PM
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?
07-02-2019 01:10 PM
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.
07-02-2019 02:27 PM
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.
07-02-2019 03:11 PM - edited 07-02-2019 03:13 PM
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
07-02-2019 03:26 PM
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.
07-02-2019 03:28 PM
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.
07-02-2019 04:15 PM
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?
07-02-2019 09:52 PM
Yes.
Have you looked as the DAQmx examples in LabVIEW?
07-03-2019
01:35 AM
- last edited on
12-20-2024
05:04 PM
by
Content Cleaner
Yes, I've read this: https://www.ni.com/en/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-handl...
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.
07-03-2019 06:57 AM - edited 07-03-2019 06:59 AM
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.