Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

error 201025 & error 200802 on USB6229 DAQ

I am attempting to read in a quadrature encoder signal, process the data & resend the processed info back out of the USB-6229 DAQ board.  I keep encountering either error 201025 or error 200802 depending if I set the autostart option of the DAQ write to T or F.  As an experiment I successfully constructed a simple DAQ read & write loop that reads in a square wave from a signal generator.  The simple VI works GREAT but when I apply the same strategy to my VI reading an encoder signal I cannot avoid the 2 error messages listed above.  I AM LOST.  ANY SUGGESTIONS?  I have attached a pdf that shows my VI's + I included both VI's.  The 1st VI in the PDF is the one that works well & the 2nd is the problem child.  The dialog of the 2 errors are included below:
 

Error -200802 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi:6

 

Possible reason(s):

 

Measurements: Write cannot be performed when the task is not started, the auto start input to DAQmx Write is false, the Sample Timing Type is something other than On Demand, and the output buffer size is zero.

 

Call DAQmx Start before DAQmx Write, set auto start to true, modify the Sample Timing Type, or change the output buffer size.

 

Error -201025 occurred at DAQmx Write (Analog Wfm 1Chan NSamp).vi:6

 

Measurements: Non-buffered hardware-timed operations are not supported for this device and Channel Type.

 

Set the Buffer Size to greater than 0, do not configure Sample Clock timing, or set Sample Timing Type to On Demand.

 

 

0 Kudos
Message 1 of 10
(6,357 Views)

Could you repost with your VI attached?  Since you are using DAQmx Write (Analog Wfm 1Chan NSamp), I assume you are generating a continuous analog output.  The errors you posted are common when you do not preload the buffer.  The general sequence is as follows:

1.  Configure
2.  Write
3.  Start
4.  Write more

I would suggest taking a look at one of the shipping examples found in the NI Example Finder.  Open up LabVIEW and go to Help»Find Examples.  Browse to Hardware Input and Output»DAQmx»Analog Generation.  A good one to look at is Cont Gen Voltage Wfm-Int Clk.vi. 

Rod T.
0 Kudos
Message 2 of 10
(6,333 Views)
I thought I did attach my VI's.  I'll repost them & the VI that works is the Read2Write.vi & the one that causes the errors is PIDoutputb.vi.  I attempted to execute the WRITE task in the same fashion as in the Read2Write.vi to no avail.  I have attempted to switch the order of the START task & I still encounter problems.
Download All
0 Kudos
Message 3 of 10
(6,326 Views)
Take a look at this KnowledgeBase for possible reasons to the Error 200802.  Error 201025 seems to be happening because you are not giving DAQmx Write any data before calling DAQmx Start.  This is telling the driver that you want to bypass the buffer, which you cannot do with this device. 

The first thing I would change about the PID VI is to set up the channel and timing in LabVIEW for the counter task.  The main thing to be careful of when doing analog output is to make sure you have data ready to be written.  This can be accomplished by synchronizing the tasks (sharing a sample clock and trigger).  Take a look at the examples that came with LabVIEW.  In the example finder, browse to Hardware Input and Output»DAQmx»Synchronization»Multi Function. 

Please post back if you have further issues.
Rod T.
Message 4 of 10
(6,305 Views)
I successfully navigated around error 201025 by your suggestion to be sure data is available for the WRITE task by creating a constant input for the 1st WRITE outside the loop.  Now I am inside the WHILE loop & encountering other errors.  So I obtained from the EXAMPLE Finder the vi's "Meas Angular Position-Buffered-Cont-Ext Clk.vi" & "Cont Gen Voltage Wfrm-Int Clk-Non Regeneration.vi".  I can set the clock for both vi's as the AO sample clock & the 2 vi's can be run simultaneously.  However, in an attempt to merge the 2 vi's into a single loop the timing of the READ & WRITE tasks while on the same source do present some conflicts that generate errors 200016 & 200284.  It appears 200284 terminates the WRITE task & then the READ eventually times out because the AO sample clock gets terminated when the WRITE task to go in error.
 
I attached the merged vi.  Any suggestions on coordinating the timing in this vi I believe will render a viable solution for the PID output.vi (I HOPE & welcome suggestions)  Oh by the way I do set the buffer sizes & sample rates on the front panel to be the same for both tasks & still these errors are generated.  I would expect if the buffers & sampling rates are identical then the 2 tasks should execute in tandem but that is not occurring.


Message Edited by tsunami on 07-30-2008 08:15 PM
0 Kudos
Message 5 of 10
(6,299 Views)
I took a look at your VI, and I noticed that you have two parallel loops.  A great resource on ni.com in addition to the Discussion Forums is our KnowledgeBase articles.  If you go to the homepage (www.ni.com), and simply put "200284" in the search bar, the very first link is the following KnowledgeBase article.

KnowledgeBase 336EKTKD: Why Do I Get Error -200284 from my DAQmx Read VI?

You should also take a look at the VI which is attached to the KnowledgeBase article.  You can see that since we want to synchronize two different tasks, we only use one while loop.  We also control the dataflow with error wires.
Rod T.
0 Kudos
Message 6 of 10
(6,279 Views)
Thanks Rod,  I actually made some progress on this issue prior to your posting & actually have a workable solution.  However, the solution has some shortcomings in that I stop & start the READ task repeatedly.  Since I have a workable solution but have a different issue now I will open a new posting "Shortcoming in READ/WRITE synchronized tasks" to maybe entice more readers & responses for a fix to my new problem.  Hopefully you have some ideas on my new problem as well.  I will study those articles because they may give me some more insight even on this new issue.
0 Kudos
Message 7 of 10
(6,275 Views)
Rod, the VI in the knowledge base article is not visible.  Are you able to forward it to me as an attachment?  I don't know why it is not visible but I only see XXX's in the locations where it appears there should be an image placed in the articles.  If you are referring to the attached VI's at the end of the article my browser could not access those links.  I would like to see the VI that synchronizes READ/WRITE tasks in the same loop.
0 Kudos
Message 8 of 10
(6,272 Views)
I'm not sure why you are not able to download the VIs, what browser and browser version are you using?  I am using the newest Internet Explorer.  I've attached the VI below.  By the way, this example program synchronizes an analog input and a counter input task.  If you would like an example that synchronizes an input and output task, please take a look at the Multi-Function-Synch-AI-AO.vi example.  Open up LabVIEW, and go to Help»Find Examples.  Then browse to Hardware Input and Output»DAQmx»Synchronization»Multi Function.  Here you can find several useful examples which deal with synchronizing multiple functions, as well as teh example that I mentioned.
Rod T.
Message 9 of 10
(6,252 Views)

i ha

I have encountered a similar problem, and  you now solve it already?would you mind  to help me solve this problem?
0 Kudos
Message 10 of 10
(3,555 Views)