Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

-200561 error analog out DAQmxWriteAnalogF64

Hi,

I'm using DAQmx in Matlab to write voltages by a USB-6009 or a PCI-6024E. Using the function DAQmxWriteAnalogF64 works mostly but not always. Every now and then the error -200561 ("Attempted writing analog data that is too large or too small") occurs although I'm writing voltages within the range (e.g. writing from1.5 to 3 Volt, analog out range set to 0 .. 5 Volt). I tested it with DAQmx7.5 and 8.3, I've used Pentium III-800, Laptop HPnx8220 (P4-1800) and P4 3.2GHz computers and always the same error. Why?

Andreas

0 Kudos
Message 1 of 6
(5,313 Views)
Andreas,

maybe the following thread helps you in finding a solution:
http://forums.ni.com/ni/board/message?board.id=250&message.id=10165
The issue is that this error seems to be created by the usage of DAQmx within MatLab. Maybe you should take a close look on how the parameters are passed between MatLab and DAQmx since i asume that the voltages you are passing are changed in a way that they do not fit the settings anymore...

Norbert B:
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(5,297 Views)
Hi,

the code examples of Jens_DE helped me to use NI cards without DataAquisitionToolbox from Mathworks. Meanwhile I got a solution to my problem but no idea what this error message means.

In my code I was writing only one value to my task but had created a task with two lines 'Dev1/ao0:1'. This caused the error about every 10th call. But no idea why the error code was -200561.

Thank you for your idea.

Andreas

0 Kudos
Message 3 of 6
(5,290 Views)

hello,I have similar problems.

According to the C language sample provided by NIDAQmx, I found the analog output routine. I can run the single task single output normally, but once I changed the analog output channel to two, for example,"Dev1 / ao0" changed to "Dev1 / ao0: 1 ", there is  error and it prompts me that attempted writing analog data is too big or too small.

Do you know why?

I really hope if angbody can help me!

Really thanks!

0 Kudos
Message 4 of 6
(2,107 Views)

Hi,

 

changing from Dev1/ao0 with one line output to Dev1/ao0:1 for output on two lines is essential. You have to change your code that you supply two values. Otherwise you get an error. Furthermore you should check in MAX whether your hardware is capable of two analog outputs.

Greetings

Andreas

0 Kudos
Message 5 of 6
(2,091 Views)

It is expecting 2 values, but if you only passed in one value, it will just go off the end of the data structure you passed in and take whatever random value that was in memory. That is probably why you are getting an error intermittently, because well, it is trying to interpret whatever random value that is in memory. Sometimes by luck, it is a value that the DAC can output, sometime it is not.

0 Kudos
Message 6 of 6
(2,084 Views)