04-23-2013 12:01 PM - edited 04-23-2013 12:11 PM
I wanted to attach two VIs but for some reason the "post" button on this forum doesn't work when you try to add an attachment and hoovers over the browse button. Anyway, the VIs would have been called Main and subpanelVi.
The Main.vi contains a subpanel and loads subpanelVi.vi in it with an invokeNode. subpanelVi.vi contains a "VISA Open" vi and a string control. When I open Main in the development environment I see the string control in the subpanel. When I create an executable of the Main.vi and run it I don't see the string control in the subpanel, I also can't stop the while loop of the Main.vi. The same happens when placing a "VISA Find Resource" vi in the subpanelVi.vi.
I would like to use these VISA-VIs in a subVI who's FP I would like to be displayed in a subpanel. Why does this go wrong and how to solve it?
04-23-2013 08:14 PM
Sounds to me like the compiler isn't including the Front Panel, because it doesn't realize it's needed.
Try enabling the SubVI's property Window Appearance\Customize\Show Front Panel When Called.
Cheers!
04-24-2013 12:04 AM
While creating executable did you included VISA ?
Please make sure that
04-24-2013 03:57 AM
I checked the checkbox Window Appearance\Customize\Show Front Panel When Called but that didn't solve the problem.
Ranjeet_Singh: If I only build an executable I don't see how to include VISA. Is it not only possible to include libraries in the Installer Builder?
The FP only does not show when I place a "VISA find resource" or "VISA Open" on the blockdiagram of the subVI I want to put in a subpanel.
I noticed that in the executable when I stop the while loop of my "main.vi" (the one that invokes the subVI), the main stopped because i can see the icon top-righ but apperently the "VISA Open" is still running. Only when I click the red abort button the main.vi window closes and disappears.
How to include VISA in the "build executable definition" and why does this problem not occur when placing a "VISA write" or "VISA read" on the blockdiagram for example?
Many thanks so far. (I'll give kudos as much as I can to the one that can help me solve this problem. It's kind of urgent)
04-24-2013 04:31 AM
You don't specify whether the subpanel is not shown at all or it's shown only partly.
VISA Find resources can be lenghty and almost program locking. The same can be true for VISA Open when you try to open unexistent or unreachable resources.
While this doesn't explain in a straightforward manner why the subpanel is not correctly loaded, it may give us a clue of the reason.
What happens if you don't run these functions when the vi is loaded, but defer by a given amount of time, or even after the user presses a button?
04-24-2013 04:47 AM
That was a very good suggestion Paolo. I put the "VISA Find Resource" with a String control attached to the expression-input in a case-structure and connected a button to it. The executable does not show the button or the string control. Having a "VISA Find Resource" or "VISA Open" on the blockdiagram of the subVI I want to open in a subpanel suffices to not be able to see the subVI's FP in the subpanel of the executable.
04-24-2013 05:10 AM
Seems sort of a bug. I still think that the problem is related to the hidden initialization stage of VISA. Have you tried running a VISA Find resources before inserting the subvi into the subpanel?
04-24-2013 07:49 AM
I realised I forgot to change the path that I connect to the "vi path"-input of the "Open VI Reference" who's "vi reference"-output is connected to the invokeNode. I corrected this and I am now able to see the FP of the subVI in the subpanel. And my subVI now even contains a "VISA Find Resource" VI.
I will try to correct this in the project I was actually working on, where I encountered this problem initially. The strange thing is that in that project I opened two other subVIs in different subpanels of my main VI and although the paths for those subVIs must also have been incorrect, their FPs were shown properly in my main VI, in contrast to the one with the VISA VIs that I later focused on.
I also found that when I stop the while loop of the main VI the subVI that is loaded in the subpanel is still running, hence my main only stops when I click the abort button. I probably don't know how to close the subVI properly. being able to add an attachment would be helpful.
I will post an update after correcting my vi path mistake.