annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Strange DAQmx Timing Source Timed Loop Error

Risolto!
Vai alla soluzione

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

0 Kudos
Messaggio 1 di 10
4.120Visualizzazioni
I've done some experimenting, it seems that if the VI is stopped, some kind of internal resource is released. I could not find a VI that releases any such resource related to timers or timing sources. Does anyone have any information on this?
0 Kudos
Messaggio 2 di 10
4.116Visualizzazioni

Hi there

 

Please post some code so we can have a deeper look.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Messaggio 3 di 10
4.097Visualizzazioni

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).

Message Edited by bkb on 10-08-2008 09:52 AM
Message Edited by bkb on 10-08-2008 09:53 AM
0 Kudos
Messaggio 4 di 10
4.093Visualizzazioni
No, this is only a picture of a piece of code. Please post some code, this will help us to solve your problem.
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Messaggio 5 di 10
4.087Visualizzazioni

There is nothing else required to post that illustrates the problem. Everything that contains a properly illustrated problem is in the previous post.

0 Kudos
Messaggio 6 di 10
4.081Visualizzazioni
The whole point of this is that I need to change the Edge count on my timing source while the program is running. I fail to see how you cannot determine the problem based on my code snippit ts.jpg.
0 Kudos
Messaggio 7 di 10
4.072Visualizzazioni
Here is a VI (click the stop button to generate the error)
0 Kudos
Messaggio 8 di 10
4.057Visualizzazioni
Soluzione
Accettato da autore argomento bkb

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.

Jarrod S.
National Instruments
Messaggio 9 di 10
4.039Visualizzazioni
Thanks, can't believe I didn't try that.
0 Kudos
Messaggio 10 di 10
4.032Visualizzazioni