04-30-2010 11:55 AM
Hi, I am getting error 200524
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 the task:2
number of channels in data:1
This is a simple PID vi using the USB 6008, using 0-9v AI1 and 0-5v 1 AO1 and 1 sample on demand. Also the differential is greyed out in the terminal configuration
Thanks
Dec
05-05-2010 09:41 AM
Hello Dec,
This is quite common when writing to multiple channels, and possibly using arrays to write data to them. What you need to make sure you do is to supply data to all channels in that task, even if it is zeros. Here is an article that describes a similar situation with digital lines, but the same principle applies:
http://digital.ni.com/public.nsf/allkb/6EF311E502936B9286256D27007CF9EC
It does seem though that you have configured 2 channels in one of your tasks, and only provide data for one of them. Have you by any chance selected channels AO0 and AO1 together by mistake? Or is this error pointing to the Analog Input channels?
If the above suggestions don't help, it might be worth posting your code so I can have a look and help further. Also, let me know what version of LabVIEW and the DAQmx driver you are using.
I hope this helps!
Kind Regards,
Michael S.
Applications Engineer
NI UK & Ireland
05-05-2010 10:57 AM
Hi, I got rid of the error by using a 2nd USB 6008, one for the input side and one for the output side. I am using the simple PID vi available download used in the demonstration with the output wired directly to the input. It works fine with an output wired directly to an input just like the demo. But I am trying to use this in a Pid loop where I have an input 0 -5 v and an output requirement of the same. The trouble now is I cant seem to get a varying output voltage.
Thanks,
Dec
05-13-2010 05:06 AM
Hello Dec,
Apologies for the delay in my response, are you still seeing problems with your application?
How are you implementing your PID? Remember that you will not really be able to achieve much of a reliable control loop with USB, the loop rate will be quite slow. Have you tried simply varying your AO?
Let me know how you are getting on,
Kind Regards,
Michael S.
Applications Engineer
NI UK & Ireland
12-05-2010 09:31 AM
hello sir, i have a similar problem..DAQmx write has error 200524.. ...and i am attaching snapshot of the front panel here ......i have the data line comin from an array ..now m not really understanding what to modify and how ....kindly help ..its very urgent and essential to me ..thanku ..
12-05-2010 11:40 AM
If it was truly urgent and essential, you should have attached the VI. You are writing four elements. You do not show the number of channels you are trying to write but if you are getting this error, it's obviously not four. What DAQ card are you using? Does it even have four analog outputs?
12-13-2010 02:01 PM
hello sir,...i think it was the problem of 'n samples' ....which i changed by configuring the daqmx single channel multiple sample option......thank u very much for the concern .....i shall get back to you soon with more problems :)..thank u very much ...:)