gnshmrthy Posted November 29, 2013 Report Share Posted November 29, 2013 Hi Friends, I`m calling a VI by selecting the properties in windows apperance of " Show front panel when called" & " Close Afterwards if originally closed " and closing the VI using the invoke node of the reference. Is this a proper way to do it. even if I close the VI it`s still running in the memory is it only because I didn`t stop the VI or calling it wrongly. Quote Link to comment
hooovahh Posted December 2, 2013 Report Share Posted December 2, 2013 I'm a little confused? Is there a reason why you don't just call the subVI like normal? What you are doing here is opening a reference to the VI by name. This will only work if the VI is already loaded into memory, and depending on your setup it may not always be, especially if you build it into an EXE. After the open you are closing the front panel. But the front panel was never opened so it will generate an error unless you already have the front panel open for some reason. All you did was open a reference to the VI it was never ran, so the code you are showing will not open the front panel. If you are trying to run the VI asynchronously use the Start Asynchronous Call function is the easiest way. Quote Link to comment
gnshmrthy Posted December 5, 2013 Author Report Share Posted December 5, 2013 Hi Hooovahh, I hope i`ve not shown a clear picture. I`ve more than 5 VI`s 1. welcome, 2. Configuration 3. selecting a database file 4. selecting a type of test 5. testing VI. On every VI i`ve enabled with the property of "show front panel when called" and i`m closing it in the initial stage of the another VI (example i`m running the welcome VI and on user event i`m calling a configuration VI and closing the front panel of welcome VI in the initial of the configuration VI and so on). Quote Link to comment
hooovahh Posted December 5, 2013 Report Share Posted December 5, 2013 Hi Hooovahh, I hope i`ve not shown a clear picture. I`ve more than 5 VI`s 1. welcome, 2. Configuration 3. selecting a database file 4. selecting a type of test 5. testing VI. On every VI i`ve enabled with the property of "show front panel when called" and i`m closing it in the initial stage of the another VI (example i`m running the welcome VI and on user event i`m calling a configuration VI and closing the front panel of welcome VI in the initial of the configuration VI and so on). That's great but doesn't answer my question. Why aren't you just calling the subVI like normal? Drop it on the block diagram using the Select a VI... from the block diagram. If you can show some code, maybe a simplified version of what you are doing it may be easier. Quote Link to comment
gnshmrthy Posted December 9, 2013 Author Report Share Posted December 9, 2013 Hi Hooovahh, I`ve attached the code which i`m calling as you suggested. In welcome vi i`m calling the configuration VI as a SubVI and in Configuration vi calling the reference of welcome vi and closed it`s front panel. Quote Link to comment
hooovahh Posted December 9, 2013 Report Share Posted December 9, 2013 You didn't post your VI's just pictures of them, but from what I see I think things should work correctly. You have your "Select The Type of Test.vi" that has a UI and when you click "New Variant" it prompts the user for input, then calls the config VI. With the config VI's settings the way you showed in the first post with Show When Called, and Close When done, then the config VI should pop up and show the UI, then when the config VI is done running it should close and return you back to the "Select The Type of Test.vi" UI. Is this how you expect it to work? Does it not work this way? Quote Link to comment
gnshmrthy Posted December 12, 2013 Author Report Share Posted December 12, 2013 Hi Hooovahh, Yeah you are correct, But here the Last VI is still running and only its front panel is closed. I hope because the while loop has not stopped the VI is still running. When I try to call back the initial VI still an error pop`s up stating that the front panel is closed. This time I`ve attached the code of the screenshot VI. welcome.vi Select the type of test.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.