10-08-2008 08:34 AM
I have a digital edge counter fed into a timed loop. Everything works fine until I stop the loop, and stop the DAQ task. Once I restart the loop it fails with "resource is reserved". Attached is my code.
Thanks
Solved! Go to Solution.
10-08-2008 08:40 AM
10-08-2008 09:09 AM
Hi there
Please post some code so we can have a deeper look.
10-08-2008 09:51 AM - edited 10-08-2008 09:53 AM
Here is a piece of code to illustrate the issue. If the timing source is created in the loop (it will be created each loop iteration) the error occurs. If it is moved outside the loop, and only created once the issue is resolved. Is there a way to RELEASE the timing source so that it can be created again? If the VI is stopped, this "resource" is released. I want to programatically release it.
Note the error comes from the timed loop Error terminal that is Probed (50).
10-08-2008 09:55 AM
10-08-2008 10:04 AM
There is nothing else required to post that illustrates the problem. Everything that contains a properly illustrated problem is in the previous post.
10-08-2008 10:14 AM
10-08-2008 10:24 AM
10-08-2008 11:29 AM
I believe the problem is that when you configure a Timed Loop to use a DAQmx Task as its timing source, the Timed Loop is automatically set up to start the task when the loop starts. Here, you don't seem to ever stop the Counter task before restarting the Timed Loop. So the second time you run the Timed Loop, it tries to start the Counter task again, and sees that a task is already running with that resource (from the first Timed Loop run).
If you use the Stop Task function for the Counter task after stopping the timed loop, you should be able to restart things.
10-08-2008 11:40 AM