07-01-2021 09:17 AM
Dear Community,
Please bear on me not attaching code. I hope my description suffices.
I have a subvi whose front panel I close using the vi reference and and the method node "close front panel". After this method node I close the reference of the subvi using close reference.vi. The Problem I have is that when I run the program and end it I can not load the front panel of the subvi anmore. I get a blank screen. It is as if something got corrupted. My guess here is that this subvi is not closed properly thus causing the loading problem.
When I remove the part that closes the subvi dynamically from the subvi things return normal again.
Using LV 2018
07-01-2021 10:21 AM
Closing the front panel nor closing the VI Reference (nor both) cause the VI to stop running.
It does sometimes, but not always. A VI is removed from memory (even when it's running) when there are no references to it. An open front panel counts as open reference.
My guess is that you get an error somewhere because of this (e.g. it's still running). You might get an error on the run method.
There are a lot of other things that can go wrong with dynamic VIs.
Use error handling. That should give you (and us) some insight.
07-03-2021 07:55 AM
You might want to try going into the "VI Properties" of the sub vi, under the "File" menu. From the pull-down menu in there, select "Window Appearance", then "Customize". Check the box that says, "Show Front Panel When Called" and "Close Afterwards if Originally Closed". Save the VI. I hope this works for you.
07-06-2021 01:57 AM
JC4, that would be the straightforward way for me. BUT: I deliberately don't close the subvi (let's call it subvi1) when it's code is finished running because I need to see its front panel until another subvi (let's call this subvi2) is through. Subvi2 runs code and closes the front panel of subvi1 by using the property "close fornt panel". Then subvi2 closes. There are no other references to subvi1 in the programm. Still when I stop the programm and go into the block diagramm of subvi1, I get the blank front panel. Again, if i remove the reference of subvi1 from subvi2 then I don't get the behaviour I need, in return subvi1's front panel opens just fine.
I have worked my way into coping with this behaviour.
Thank you for your replies.
07-06-2021 05:45 AM
You can use the "Close after call" but synchronize the two subvi's through e.g. a Rendevouz, so the fast one waits for the other to finish.
07-07-2021 03:56 AM
wiebe@CARYA wrote: prepaidcardstatus
Closing the front panel nor closing the VI Reference (nor both) cause the VI to stop running.
It does sometimes, but not always. A VI is removed from memory (even when it's running) when there are no references to it. An open front panel counts as open reference.
My guess is that you get an error somewhere because of this (e.g. it's still running). You might get an error on the run method.
There are a lot of other things that can go wrong with dynamic VIs.
Use error handling. That should give you (and us) some insight.
The Problem I have is that when I run the program and end it I can not load the front panel of the subvi anmore. I get a blank screen. It is as if something got corrupted. My guess here is that this subvi is not closed properly thus causing the loading problem.
When I remove the part that closes the subvi dynamically from the subvi things return normal again.
07-07-2021 06:35 AM
@HappyCod wrote:
wiebe@CARYA wrote: prepaidcardstatus
Closing the front panel nor closing the VI Reference (nor both) cause the VI to stop running.
It does sometimes, but not always. A VI is removed from memory (even when it's running) when there are no references to it. An open front panel counts as open reference.
My guess is that you get an error somewhere because of this (e.g. it's still running). You might get an error on the run method.
There are a lot of other things that can go wrong with dynamic VIs.
Use error handling. That should give you (and us) some insight.
The Problem I have is that when I run the program and end it I can not load the front panel of the subvi anmore. I get a blank screen. It is as if something got corrupted. My guess here is that this subvi is not closed properly thus causing the loading problem.
When I remove the part that closes the subvi dynamically from the subvi things return normal again.
Our problem is that we can't really help without seeing any code.
All kinds of things could be wrong.