LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200946 occurred at DAQmx Start Task.vi

I am using a PCI 6534 to generate a pattern ( 2M average size) of 32 bit words. The pattern is created, loaded once and then repeated in a while loop. The pattern is repeated at the maximum rate of the while loop. At regular intervals the Error code -200946 is generated. Currently the task is then re-intialized and the pattern is re-loaded. Attached is a simplified program which reproduces the error. In the program, an error is generated if the sample size is 2M and approximately 145 loops have executed ( or 1M samples and 285 loops, ect). What can be changed to not have the error situation?
 
Thanks
Message 1 of 7
(4,669 Views)

If you want to continuously output the data that you originally wrote to the buffer, you can set the DAQmx timing vi to continuous samples.  When continuous samples is selected the default the regeneration mode is set to 'allow regeneration'.  This means that the samples you originally wrote to the buffer will repeat at the output automatically.  You will only need to start and stop the task once.  When you select this mode you can use the DAQmx Is Task Done vi inside the while loop.  This vi will return the status of your task each iteration of the loop.  Your vi has been changed to do this.  Also, you can tell the driver to only use memory on the 6534 depending on your sample size.  You can find an example in LabVIEW that does this.  It is called Cont Gen Voltage Wfm-Int Clk-On-Board Regeneration.vi, and it can be found in example finder.


Regards,

Jesse O
Application Engineering
National Instruments

Jesse O. | National Instruments R&D
Message 2 of 7
(4,649 Views)
Jesse,

Thanks. I understand this method and it is perhaps the way to go but I also need to perform other tasks during and after each pattern is run. For example: A PCI-6250 analog input channel is clocked to every 4 th sample of the patten generator using a counter. At the end of each pattern the data from the analog input channel is processed and displayed in a 2D intesity graph as an image. The pattern is then repeated unless the user changes the pattern. Thus I took the approach of this being a finite sample task repeated as required. Can the pattern be stopped at the end and restarted with a trigger or other such method when using continuous samples mode?
Thanks,
Dave
0 Kudos
Message 3 of 7
(4,640 Views)

Dave,

I took another look at your example program and I was able to recreate the error.  I do not believe this is expected behavior and will let our R & D department know about it.  In the mean time, I was able to get your application to run by making a minor change.  If you expand your while loop to include the DAQmx create task, DAQmx timing, DAQmx start and the DAQmx clear task then you will no longer get this error.  I have been able to run the application after making these changes for over 600 iterations.  By recreating and clearing the task every iteration of the while loop the error goes away.

Regards,

Jesse O.
Application Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 7
(4,634 Views)
Jesse,
What the application does now is when the error is detected the task is cleared and restarted. I will look at doing that every iteration. I am trying to keep the frame rate up so I am not sure of what impact that will have. Still it may be better than having our customer asking about the error that occurs every minute or so. Please keep me informed of what your R & D folks say.
Thanks for the help,
Dave
0 Kudos
Message 5 of 7
(4,627 Views)

Dave,

After further testing of that code, we have been able to find another work around.  Inside the while loop where you have the DAQmx Start, if you place the DAQmx write before the stop inside the loop the error goes away.

Regards,

Jesse O.
Application Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 6 of 7
(4,615 Views)
Sorry, the above should read:  "if you place the DAQmx Write before the DAQmx Start inside the loop the error goes away."


Regards,

Jesse O.
Application Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 7 of 7
(4,613 Views)