LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging with Subpanels

I am building an application that uses two subpanel controls in its front panel. The main purpose of these is according to the logic of The LabVIEW Style Book: simply to reduce the complexity of the Main VI's block diagram, to keep it at least somewhat readable and manageable.

The program runs fine, but is beastly to debug for several reasons:

1. There seems to be no way whatsoever to use debugging tools on a VI running inside a subpanel. At least, LabVIEW has resisted every effort on my part to open the block diagram of a VI running in this matter. Am I right? Or is there some way to do it anyway.

 

2. Is there some way, through the use of clones or whatever, to allow a subpanel to operate even if its VI is already open in the editor?

 

3. If my program crashes or I have to use the abort button, the VIs running in the subpanels do not stop! And next time I run, I will see the message, "LabVIEW: The VI is not in a state compatible with this operation. Method name:  Run VI." This gets really tedious and annoying. I wonder, is there a way, as my program starts a second time, to have it hunt down and kill any previously open or running instances of those VIs?

Dear designers of LabVIEW, if you're listening: subpanels are great idea for program cleanliness and organization. But the need to use VI Server to set them up is terrible! Too much machinery required, and too hard to debug. Please, could we have a simpler, cleaner mechanism for the case of subpanels that only ever run one VI?

Ken












0 Kudos
Message 1 of 4
(2,828 Views)

Hi Ken,

 

I'd suggest posting this idea in the LabVIEW Idea Exchange forum. The ideas posted there (especially those that garner user kudos) are considered by our developer team, and several ideas from the exchange were implemented in LabVIEW 2010. Thanks for posting!

Andy H.
National Instruments
0 Kudos
Message 2 of 4
(2,790 Views)

Hello,

 

In regards to:

1) I have found that putting breakpoints in the subpanel code will make the block diagram appear separate from the instance of the subpanel

2) This I have not been able to do, which is why the above workaround was used

3) You can use Application.All Vis in Memory property node to find those VIs, recursively get the references to them and them use the Abort Method upon them. We've built an "Abort all runing Vis'" program that we just keep on the desktop for this purpose (again only for Abort cases). I have also created a LV2 stop global that I can call on program start, which would stop all Vi's into which it is incorporated. A little extra work, but it helps a lot.

 

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 Kudos
Message 3 of 4
(2,778 Views)

One method I have used is to right click the "vi subpanel" container and select 'Allow User to Open Diagram'.  This will allow you to open during run time.  The trick is to not open it until after your vi loads the vi into the panel.

Message 4 of 4
(2,766 Views)