02-02-2012 01:55 AM
Is this method still valid in the runtime engine 2011?
Following this post for LV8.6
http://zone.ni.com/reference/en-XX/help/371361E-01/lvprop/vi_run_vi/
After I build my VI with the execution builder, the run VI method doesn't work anymore with the runtime 2011..?
02-02-2012 07:38 AM
Code Snippet provided...
02-02-2012 07:47 AM
02-02-2012 07:51 AM
I did not include the dynamically called vi's in the build.
But the vi insertion in the subpanel works. Because I see the frontpanel of the called vi displayed.
02-02-2012 07:57 AM
I build it with the vi included. Still doesn't work.
02-02-2012 10:30 AM - edited 02-02-2012 10:31 AM
Try wiring the error out of the load subpanel to the error in of the run method. Wire the error out of the run method to the shift register. Errors get swallowed in the runtime environment (I think) and your display error vi might give you a clue. Also you are only showing the "load" case. What's in the other cases? Can you attach the VI?
02-06-2012 12:40 AM
Steve,
Ooops, indeed, I forgot to wire the error handler on this method. I get some error now when aborting the running vi (I think).
See attachment.
02-06-2012 01:58 AM
I already removed the abort vi method. Because closing the vi reference is removing the vi out of memory(I think)?
But when I want to run the vi a second time, it's not in a state compatible with the operation. Is this because the vi is still in running state? How can I move it to closing state?
02-06-2012 07:27 AM
02-06-2012 10:23 AM
I would 100% avoid calling the abort vi method and instead find an elegant way to cause the subvi to exit. Write a stop control value, use an AE to trigger a stop Evel a naked Global would be better than abort vi method.
And since the sub-vi is responsible for disposing of its own reference (Autodispose of ref =T) and the vi does that disposal as it exits, Stopping it by the "slamming into the tree" abort method may have unintended consequences leaving its reference in memory and the vi in a state incompatable with running.