08-26-2020 01:21 AM
Hello I want to measure 40 analog inputs and output 5 square wave digital signals using Labview and cDAQ. A 200294 error occurs in the digital write block when running after connecting to cDAQ. How can I do it? Attach the code.
Solved! Go to Solution.
08-26-2020 02:39 AM - edited 08-26-2020 02:41 AM
Hi GChae,
the error description of the error -200209 is pretty clear: do you want to use a channel twice in the task? (Unfortunately you forgot to set some useful default values in the DAQmx channel control for the AI task.)
Error -200294 also is clear: not enough samples in the DAQmx write buffer…
Some other problems:
Your DO task is created with 8 DO channels (line0:7), but the array you create before the DAQmxWrite just contains 5 elements. Where are the missing 3 samples?
The AI task is created as "continuous" with a sample rate of 1000S/s, but in the loop you read just 1 sample per DAQmxRead call: this will quickly lead to "buffer overrun" errors (-200279)!
I recommend to place AI and DO tasks into their own separate loops…
Try to use less/no local variables. Especially the "Checked cycle" locals can be replaced by a shift register!
08-26-2020 03:04 AM - edited 08-26-2020 03:05 AM
Thank you for the reply.
After reviewing the answer, I tried applying the new code, but it was confirmed that the same error occurred in DAQmx Write still the same.
As shown in the attached picture, if SimDEV is used for Digital Out, it works normally, but if it is used for an actual CDAQ device, the same error code occurs.
What could be the reason?
- error point
- In case of Using real cDAQ(Error occur)
- In case of Using SimDEV(Operating)
08-26-2020 03:20 AM
08-26-2020 03:22 AM
Now it works. Thanks.
08-26-2020 05:59 AM
Hi,
Try to go to this forum post as the same error is discussed and solved:
https://forums.ni.com/t5/LabVIEW/error-200294-in-Daqmxstart-task/td-p/3088409?profile.language=en