LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 analog outputs

Hello,
I use LabVIEW 8.0, PCI 6052E and have sinchronized 1 AO and 8AI. AO is a sinewave. Everything works well.
 
Then I want to have 2AO - the first one is the same sinewave, the second one  is only stable zero. I created an array of two dataways and tryed to connect them to DAQmx Write and DAQmx Timing (as for 1AO) - but I get data type mismatching.
 
I also tryed to create two different tasks - one for each output, but in this case, I get an error either.
 
Picture is in file - the first one - working well 1AO, the second one - my problem.
 
Thank you in advance for all ideas.
 
Anna
0 Kudos
Message 1 of 5
(2,531 Views)

Your problem is with trying to wire a 2D array to the DAQmx Timing function. This only accepts a single waveform. Since you can only have a single timing source, this makes sense. Try something like the code below. And plese, in the future, just attach your images instead of a word doc.

Message Edited by Dennis Knutson on 09-17-2007 12:26 PM

0 Kudos
Message 2 of 5
(2,527 Views)

Thank you for your quick reply.

Now I have got an error - Number of samples to write must be the same for every channel.

and I think it's because zero-channel creates only one number, not 1000. Am I right?


 

0 Kudos
Message 3 of 5
(2,521 Views)

Yes. The number of elements in the array where you want a constant voltage has to match the number of elements in the waveform array. Sorry I didn't show this. Make the modification as shown below and see if that gets rid of the error.

Message Edited by Dennis Knutson on 09-17-2007 01:01 PM

Message 4 of 5
(2,513 Views)

Thank you a lot. It works as I want.

Anna

0 Kudos
Message 5 of 5
(2,501 Views)