10-07-2011 02:03 PM
Hi,
There's a VI that has nested timed loops inside it. If I use the "continous run" button of LabView, it runs fine. However if I try to run this VI through other methods (calling it inside some for/while loo) it only runs once and will choke on subsequent calls. Could this have something to do with an instnace of "VI server reference" that exists inside the code or times loops?
Thanks for your help
10-07-2011 02:05 PM
You'll have to post some code so we can see what you are trying to do.
The run continuous button is never meant for normal operation of a VI, only for debugging purposes like a subVI, so if that is the only way your VI "works", then something must be wrong.
10-07-2011 04:08 PM
I have narrowed down the issue to an error that prevents a named timed loop from executing second time the VI is called:
error -816: Timed structure aborted or attempted to execute another iteration of the following aborted time loop.
The VI has an instance of "Stop timed structure VI" that requires a "name" for the timed loop.
Now, I am wondering whether the fact that that name is no longer valid second time the VI is executed could be the issue, so tried to replace that string name of the timed loop with a variable.
Did not solve the issue. Any more ideas?
10-07-2011 09:17 PM
Still need to see what your code looks like...
Mike...
10-10-2011 01:45 PM
A possible solution may be to trap and clear the error -816. Clearing the error should not change the functionality of your code and allow you to call the VI twice in a row.
http://www.ni.com/gettingstarted/labviewbasics/handlingerrors.htm
Also you might want to read though this forum, the last two post talk about same issue
http://forums.ni.com/t5/LabVIEW/Restarting-counter-in-Timed-Loop/m-p/1419264?requireLogin=False
Tim O
Application Engineer
National Instruments
ni.com/support
10-10-2011 03:53 PM