07-08-2005 01:18 AM
07-08-2005 03:18 PM
Hello,
The main problem that I see from your description is that you are trying to perform Analog Input (AI) in two different tasks at the same time. This is why you are getting the "specified resource is reserved" error. All AI channels share one AI Sample Clock. Therefore, you must have all AI channels that you plan to sample from in the same task. I suggest putting all AI channels from Task 3 into Task 1. You will have to acquire them at the same rate, but this should take care of the error you are seeing.
As for the pulse train, is it running at the correct frequency when you run it as a separate VI? Could you send me a screen shot of you block diagram, or even the VI so I have a better idea of what you are doing?
Let me know your results after combining Tasks 2 and 3.
Regards,
Sean C.
07-11-2005 09:40 AM
07-12-2005 11:08 AM
07-15-2005 03:43 PM
07-18-2005 11:10 AM
07-19-2005 02:11 PM
07-20-2005 01:38 PM
08-03-2005 10:57 AM
08-04-2005 10:32 AM
Hi Nick,
It sounds like your while loop is being help up by all of your data manipulation and file I/O. The errors you are receiving make me think that your while loop is not iterating fast enough to keep up with your data acquisition. To verify this, try putting your DAQ Tasks in a while loop by themselves. Do you still receive the buffer overwrite error?
Removing or hiding unused controls and indicators will definitely help improve performance.
It might help in the short term to manually increase your buffer size, but all this will do is increase the amount of time it takes for an error to occur.
ai/sampleclock is an on board clock generated from your board's master 20 MHz timebase. It is very accurate and not likely to cause the problems you are seeing.
The ability to start and stop your AO task shouldn't add too much overhead to your application, so it should be ok.
The first thing I would do to begin trouble shooting this issue is to create a new VI which performs only your DAQ tasks. If this works properly, start adding in the rest of your code piece by piece until you start to receive the error again. If it turns out that the rest of that code is causing the error, I would recommend looking into a new programming architecture for this VI. Specifically something like a Producer/Consumer or Master/Slave loop architecture. These frameworks consist of 2 loops; one for DAQ which runs fast, the other for data manip and File I/O, which can afford to run a little slower. Please see the LabVIEW Help file for more information about these architectures. In LabVIEW select File... >> New... In the window that pops up, browse to VI from Template >> Frameworks >> Design Patterns. This allows you to view the different architectures available and even build off of a template.
Please let me know how your troubleshooting works out.
Regards,
Sean C.