LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to navigate a running Block Diagram that is being used in a subPanel?

Solved!
Go to solution

I have a subVI called Servo.vi that is invoked multiple times (cloned) in my application. The Front Panel of a selected Servo.vi is placed in a subPanel in my Main.vi so that Servo.vi can be operated from its Front Panel. When the Main.vi is running, if I use the block diagram of Main.vi to navigate to a running clone of Servo.vi and double click on it, LabView 2010 navigates me to the subPanel running in Main.vi, instead of a separate Front Panel. But I am not able to bring up the Block diagram of the cloned Servo.vi from the subPanel running in Main.vi.

 

How to navigate a running Block Diagram of a cloned VI that is running in a subPanel?

 

Main.vi - Servo.vi:1

           |

           - Servo.vi:2

          |

          - Servo.vi:3

 

0 Kudos
Message 1 of 10
(3,599 Views)

It sounds like you have the servo vi running as reenterant. If this is true then you will not be able to get to the block diagram while it is running. That is one drawback of running a renentrant vi. If you are trying to get to it while the code is not running then you need to go to the operate menu item and have it go to edit mode.

Tim
GHSP
0 Kudos
Message 2 of 10
(3,598 Views)

I can get to the running instance of a reentrant VI if I navigate using the block diagram of the parent VI. That will take me to the Front Panel of the cloned reentrant VI, and from there, using the menu, I can open the Block Diagram of the cloned reentrant VI and see the running code of that instance and highlight and set probes, etc to debug it.

 

But the problem occurs when the Front Panel of a reentrant VI is used in a subPanel. When I navigate to the reentrant VI using the Block Diagram of the parent VI, it takes me to the SubPanel where the reentrant Front Panel is running. In that case I can not get (I do not know how to get) from the SubPanel to the running Block Diagram of the cloned reentrant VI to do the debugging. That's the problem.

 

How do I get from the SubPanel to the Block Diagram of the running VI?

 

How do I debug the Block Diagram of a running reentrant cloned VI, when its Front Panel is running in a subPanel?

0 Kudos
Message 3 of 10
(3,584 Views)

You could try adding a strategic break point in the re-entrant, subpanelled VI  - that way the block diagram will pop up to the front (it will also pause execution of that VI, so you will want to make sure the breakpoint is in a safe place!)

Message 4 of 10
(3,572 Views)

@shew82 wrote:

You could try adding a strategic break point in the re-entrant, subpanelled VI  - that way the block diagram will pop up to the front (it will also pause execution of that VI, so you will want to make sure the breakpoint is in a safe place!)


Ditto that!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(3,561 Views)

I am not sure on which condition to set the breakpoint on.

 

Just want to pop up the running block diagram of a reentrant VI whose Front Panel is used as a subPanel. Shouldn't there be a way to do that for debugging sake? Why does double clicking on a cloned subVI bring up the subPanel rather than the Front Panel with menus, as it usually does for no reentrant VIs? What is the benefit of bringing up the subPanel?

 

 

0 Kudos
Message 6 of 10
(3,529 Views)

Place a breakpoint on any node or wire that will be called after the VI is in the subpanel, at a point whereby pausing the program will not put the system in an unsafe state. With that in place, when LabVIEW reaches that breakpoint, it will pause the VI in the subpanel and, more imporantly, open up the block diagram.

Message 7 of 10
(3,519 Views)
Solution
Accepted by topic author dbaechtel

dbaechtel,

 

 

Have you tried this ?

Message 8 of 10
(3,491 Views)

Looks like a solution. I will try it.

 

 

0 Kudos
Message 9 of 10
(3,477 Views)

Works GREAT !!

 

THANKS.

0 Kudos
Message 10 of 10
(3,436 Views)