From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Error -200524 when trying to output two analog voltage signals

Solved!
Go to solution

I am trying to output two analog voltage signals simultaneously using Labview 8.2.1. One is a waveform for producing sound and the other is a trigger to another computer (using labview 6.1). I have been getting error -200524 at DAQmx Write. Here is a screen shot of my VI:

 

Error-200524.png

 

 

 The error message says:

 

"Measurements: Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written. "

 

How can I fix this problem? Thank you. 

 

Message Edited by RKuo on 03-10-2010 07:02 PM
0 Kudos
Message 1 of 7
(4,323 Views)

Two problems:

 

First of all, you are using the "N Channels 1 Sample DBL" instance of the "Write" VI.  Use "N Channels N Samples 1D Wform" instead.  Click on the polymorphic selector and change it.

 

Then, you'll need to wire a waveform for each channel, so your input will be a 1D array of waveforms.  Element 0 of your array will be the waveform you are writing to channel 0.  Element 1 of the 1D array will be the waveform you are writing to channel 1.   Don't just wire in a single waveform.  If you want to write the same waveform to both channels, use "Build Array" to build the 1D array.  Wire the same waveform to both elements of the array.

 

Please clean up your block diagram, too -- your wires are all over the place and it's a mess.  And what do you have that sequence structure for?

0 Kudos
Message 2 of 7
(4,312 Views)
0 Kudos
Message 3 of 7
(4,307 Views)

I am trying to write different waveforms to each of the two channels. So Channel 0 will output Waveform 0 and Channel 1 will output waveform 1. I used the 1D waveform when I tested out the VI with just one waveform and one channel but I was not able to find a way to have different wave forms for each of the channels simultaneously. The reason I selected the "N Channels 1 Sample DBL" is because that was the only one that made the wire show no errors.

 

 I tried separating the waveforms and wiring them separately but I am not sure how to do that and when I tried it errors occured. Where do I connect the output waveforms from the waveform builder so that I can have them on separate channels? Oh and the sequence structure is to have pauses in the output so that the waveforms are generated in pulses. Thank you.

Message Edited by RKuo on 03-11-2010 12:27 PM
0 Kudos
Message 4 of 7
(4,291 Views)
I checked out that discussion and looked at the example but it only shows how to output to a single channel. Thank you for showing me the discussion.
0 Kudos
Message 5 of 7
(4,287 Views)
Solution
Accepted by topic author RKuo

You only show one waveform in your block diagram.

 

Here is a picture which shows what I told you to do in my earlier post.

 

output 2 waveforms.PNG

The waveform wired to element 0 of "Build Array" will be output on channel 0.  The waveform wired to element 1 of "Build Array" will be output on channel 1.  The instance of "DAQmx Write" is "Analog 1D Wfm NChan NSamp".

 

Hope that's clearer!

d

0 Kudos
Message 6 of 7
(4,286 Views)

Thank you DianeS. That worked perfectly.

 

Just a note for anyone else who is doing something like this, if your arrays are different sized going into the waveform builder the array combine function that comes afterward will not be able to pad the resulting waveform to match size and you will get error -200103.

0 Kudos
Message 7 of 7
(4,262 Views)