LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanel debug

Solved!
Go to solution

Hello,

 

Recently I have been playing with subpanels. There is many of them in my project and it is very hard to debug them. Is there an easy way to show current subpanel block diagram?

 

I can click and allow to show block diagram or I can set breakpoint and make BD appear. But is there more elegant way that I am not aware off?

0 Kudos
Message 1 of 9
(4,106 Views)

Hi pawhan,

 

why don't you debug your subVIs before you start loading them into subpanels?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,101 Views)

I am doing that but sometimes subpanel gets message from top level vi and it is hard to simulate that before whole app is working.

0 Kudos
Message 3 of 9
(4,091 Views)

well if you want to debug it , most probably you need to see what values you are getting and how you are using these values for that breakpoints are good.

0 Kudos
Message 4 of 9
(4,064 Views)

@pawhan11 wrote:

I am doing that but sometimes subpanel gets message from top level vi and it is hard to simulate that before whole app is working.


If you know what the messages are, then you can test it.  My advice would be to make a second application that just has your VI going into the subpanel and another loop that you can use to send messages from.  You can then debug that VI in any way possible.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(4,052 Views)
Solution
Accepted by topic author pawhan11

So lets say I run Main.vi, and it runs Panel.vi and inserts it into a subpanel in Main.vi.  

 

What I will do is run Main.vi with the block diagram open.  Then I will hold CTRL and double click on the Panel.vi subVI (with auto-tool off) and it will open the block diagram of the Panel.vi, even if the front panel of Panel.vi is currently in a subpanel.

 

This CTRL double click to open a block diagram works on non-running subVIs as well.

 

You can also add a breakpoint in Panel.vi but that maybe ran before it is inserted into the subpanel which would cause an error when the front panel is already open and you try to insert it into a subpanel.

Message 6 of 9
(4,042 Views)

@Hooovahh wrote:

So lets say I run Main.vi, and it runs Panel.vi and inserts it into a subpanel in Main.vi.  

 

What I will do is run Main.vi with the block diagram open.  Then I will hold CTRL and double click on the Panel.vi subVI (with auto-tool off) and it will open the block diagram of the Panel.vi, even if the front panel of Panel.vi is currently in a subpanel.

 

This CTRL double click to open a block diagram works on non-running subVIs as well.

 

You can also add a breakpoint in Panel.vi but that maybe ran before it is inserted into the subpanel which would cause an error when the front panel is already open and you try to insert it into a subpanel.


I didn't know about that. It makes it much faster now. Thanks 🙂

0 Kudos
Message 7 of 9
(4,036 Views)

hi there, here is one simple subpanel solution, try it:

 

https://decibel.ni.com/content/docs/DOC-41897

 

regards.

0 Kudos
Message 8 of 9
(3,604 Views)

I think if you right click on the subpanel in edit mode and tick the 'allow user to open diagram' option you can then right click on the VI in the subpanel while it's running and 'View block diagram'. This will give you the block diagram of the VI/instance currently inserted into the panel. Very useful for debugging!

 

Edit: Ah, after re-reading I see you already mentioned that.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 9
(3,573 Views)