LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to debug a dynamically loaded re-entrant VI?

Solved!
Go to solution

I have an application where I have a re-entrant subVI that is being used in three subpanels in my main VI. How can I look at one instance of this subVI for debugging?

 

In my previous version I used the same subVI, but instead of using a subpanel I linked the subVI controls to my main VI using references. When debugging, it worked great as I could open a clone of the VI and use highlight execution, but it required a lot of work in my main VI if I modified the interface to the subVI. I therefore wanted to try using subpanel, but I then have to call my subvi dynamically.

 

Terje

0 Kudos
Message 1 of 7
(5,762 Views)

The simplest approach (for LV 8.X+) would be to put a break point just prior to the re-entrant call and then single step into the sub-VI.

This was not possible prior to LV 8.0.

Remember to get rid of the break-point when you are done.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(5,751 Views)

Thanks Ben.

That’s it.

I didn’t know you could step into a ”Call By Reference Node”

 

Terje

0 Kudos
Message 3 of 7
(5,736 Views)
One other thing to remember is that the complication arises from your VI being both reentrant AND in a subpanel. If it were reentrant but not in a subpanel you could write a small program that could look up the clone name and open it programatically. Alternately, if it were in a subpanel but not reentrant, you could install the VI into the diagram of a VI that isn't executint. Then double clicking on its icon in the nonexecuting block diagram while holding down the cmd key will pop the block diagram open.

There are ways of debugging reentrant subpanel VIs in pre V8, but it gets a bit more complicated.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 7
(5,716 Views)
Solution
Accepted by topic author Terje
There is one easy way to get to a subpanel's block diagram to debug it. When the VI with the subpanel is in Edit Mode, right click the subpanel frame and select the option that says something along the lines of Allow User to Open Block Diagram. Then when your VI is running and the VI is in the subpanel, you can right click the subpanel and select Open Block Diagram. From there you can debug however you like.
Jarrod S.
National Instruments
Message 5 of 7
(5,713 Views)

Thank you guys for great replies.

Jarrod S.: Didn’t know about that feature. Exactly what I wanted.

 

Terje

0 Kudos
Message 6 of 7
(5,687 Views)

Jarrod S., thanks, this is exactly what I want.

Message 7 of 7
(4,707 Views)