LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get error 200524 during function generator 2 sample code?

Solved!
Go to solution

I'm getting the following error message:

 

Error -200524 occurred at function generator 2 channel_lv86.vi

 

Possible reason(s):

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.

Number of Channels in Task: 1
Number of Channels in Data: 2

Task Name: _unnamedTask<E>

 

when I downloaded and executed the 2 channel code here: https://forums.ni.com/t5/Example-Code/DAQmx-Function-Generator-with-Analog-Output/ta-p/3517574

 

I have a DAQ pci-e 6259 card and a BNC-2110 block

 

Why am I getting this error?

 

When I opened the VI I selected "Dev1/ao" under physical channels. I tried all other options (a0-a3) which gave the same error message.

 

 

0 Kudos
Message 1 of 4
(2,952 Views)
Solution
Accepted by topic author invasion2121

If you have 2 channels in your data (like the error message says), then you need to pick 2 channels in your task control (the error message says you've only picked 1.)

 

Did you see in the example how they were able to identify the 2 analog output channels?

0 Kudos
Message 2 of 4
(2,940 Views)

Hi RavensFan  - 

 

How do I pick 2 channels? 

 

When I execute the vi I see a labview GUI popup that allows me to select a0-a3 (only 1).  How can I possibly pick 2 from a drop down menu?

 

Are you talking about the wiring diagram? If so, which piece of it (i.e. #1 is when the AO voltage channel is created, #2 is prohibit regeneration of data, etc..)? 

0 Kudos
Message 3 of 4
(2,930 Views)

You can either type in the channel information like it shows in the example.

 

Or you can choose the Browse option which brings up the dialog box to be able to pick multiple channels.

0 Kudos
Message 4 of 4
(2,923 Views)