LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subpanel with visa not visible in executable

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?

0 Kudos
Message 1 of 8
(3,585 Views)

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!

0 Kudos
Message 2 of 8
(3,562 Views)

While creating executable did you included VISA ?

Please make sure that 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 8
(3,552 Views)

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) 

 

0 Kudos
Message 4 of 8
(3,542 Views)

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?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 8
(3,536 Views)

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.

0 Kudos
Message 6 of 8
(3,531 Views)

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?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 8
(3,525 Views)

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. 

 

0 Kudos
Message 8 of 8
(3,520 Views)