LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debug technique to locate VI which is "hanging"/waiting. Pause button - is not working.

Solved!
Go to solution

During development I now and then experience that the top-vi simply "hangs"The debug Pause button does not break into the program - it turns red but nothing happens.

 

I can stop with "Abort button", but then I can't see which vi was stuck in a waiting state - this information is lost.

 

Are there a way to determine the "state" of sub-vi's in a running application (during development).

like a list:

  A.vi : Running

  B.vi:  Waiting for IO, queue or similar

  C.vi:  terminated

 

That would help locating the problem.

 

Any clever tricks?

 

0 Kudos
Message 1 of 3
(3,337 Views)
Solution
Accepted by topic author heel

I looked on the forum as I thought this had been addressed previously but I only found this thread:

 

http://forums.ni.com/t5/LabVIEW/How-to-find-which-sub-vi-is-running-in-highlight-execution-mode/m-p/...

 

If your issue is easily reproducible, you can use the "Retain Wire Values" option to see what has exectued and when (the "Last Update" timestamp is saved and you can read it with a probe.)  This way, you can quickly follow the dataflow and see where your progam hangs.

 

Otherwise, you can dig into your subVIs and look at the Run arrow of each one.  Look in the help file for "VI Toolbar Buttons" and look at the top three icons.  One icon is actually missing from that list and it is another run arrow, slightly different, that indicates that the VI is part of a running application but is not currently executing.  By finding which VI is actually running vs simply waiting to be called, you can find where your problem is.

Message 2 of 3
(3,329 Views)

 

Many thanks for your valuable suggestions. I used your suggestion about the running vi indicator with success:

1) Engage the Pause button in the hung application

2) Open block diagram,

3) Find runnning vi indicator (see image below).

4) Open this vi,

5) Engage its Pause button.

6) locate the running vi arrow.

...and so forth down the tree. Except it only works for vi's having dfebugging enabled.

 

I found the issue with my application - reported http://forums.ni.com/t5/LabVIEW/Continuous-Measurement-and-Logging-Template-May-hang-up-due-to/td-p/....

Running Vi Indicator.png

 

0 Kudos
Message 3 of 3
(3,291 Views)