LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any properties to distinguish running VIs from active running VIs?

Solved!
Go to solution

The Execution:State property is an enum of four states. But one of the states, "Running", is actually two different VI states: reserved and actively running. The difference is whether or not code is actively executing in that VI and whether the Abort button is enabled. When trying to figure out why an application is hung, it would be really nice to be able to identify all the active VIs in an application instance. 

 

Is there any backdoor way to identify VIs that are actually running? Maybe some clever trick for identifying an active Abort button? Grabbing screenshots of every "Running" front panel and checking for a red dot is the best idea I've been able to come up with. 

 

0 Kudos
Message 1 of 10
(1,527 Views)

Not that I'm aware off!

 

That red dot idea is interesting but way to brittle to warrant such effort. Just have a screen with the toolbar hidden in the VI settings and there is no red dot anymore to be found (unless you put a red led on the frontpanel somewhere of course, but that would be another potential failure source).

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 10
(1,498 Views)

Brittleness acknowledged, but when I'm searching through 5000+ VIs for which chain is still running, I'll take brittle over nothing!

And given that whatever is still running is clearly not one of my UI-level VIs, the chances of the toolbar being hidden are diminished substantially. 

0 Kudos
Message 3 of 10
(1,490 Views)
Solution
Accepted by srlm

Try this

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 10
(1,478 Views)

And this.

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 10
(1,443 Views)

Paul: That is some serious out-of-the-box thinking! And I have no idea why it works! 

Your VI is missing a Not, but, otherwise, this seems to pass my testing. 

srlm_0-1668712948770.png

 

0 Kudos
Message 6 of 10
(1,438 Views)

@srlm wrote:

Paul: That is some serious out-of-the-box thinking! And I have no idea why it works! 

Your VI is missing a Not, but, otherwise, this seems to pass my testing. 

srlm_0-1668712948770.png

 


I didn't come up with it.  Don't remember where I got it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 10
(1,410 Views)

Also vote here

 

There are more threads about it. I tried to find AQ's explanation for why it works the way it does. I only found the short one: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/More-Specific-Execution-State-of-VI-Reserved-for-Exec...

 

Certified LabVIEW Architect
Message 8 of 10
(1,339 Views)

thols: thanks. AQ was right to be concerned about its use within an application. I'm looking for it as a debug tool outside the application for identifying what loop isn't quitting so I can fix it. 

0 Kudos
Message 9 of 10
(1,309 Views)

@paul_cardinale wrote:


I didn't come up with it.  Don't remember where I got it.


I'm pretty sure I first saw this technique on LAVA where I also said it wasn't possible only for someone to prove me wrong.

0 Kudos
Message 10 of 10
(1,306 Views)