JKI Blog

Need a way to visualize VI call chain hierarchy in LabVIEW

Oct 15, 2010 11:53:05 AM Published by Jim Kring Leave a comment

The following is a post I recently made on the LabVIEW Idea Exchange. If you like my idea, please give it your kudos (vote) and maybe it will become a real LabVIEW feature someday.

Problem Statement

I often find myself debugging code that seems to have "hanged" and I want to find out which VI is causing the lockup (maybe it's waiting on some event/queue/message/timeout or maybe it's stuck in an infinite/long loop). There's no really easy way to figure out which subVI (or perhaps a node) is not returning from its call.

My Work-Around

The way that I currently do this is to start opening up VIs and looking at their "Run Arrows" (the run buttons on the VI toolbar) to see which subVIs are currently "running" (being called).

Running (Top-Level VI)

Running Top Level.png

Running (subVI of a Running Top-Level VI)

Running Top Level.png << This is what I look for

Not Running (subVI of a Running Top-Level VI)

Not Currently Being Called.png

This technique works OK, but it takes a lot of time to track down the running VI (in applications where there are LOTS of VIs), since you have to just start opening up all your VIs a looking at their run arrows.

Question: Is there any way to look at the run state of a VI using VI Server or Scripting? Unfortunately, the VI Execution.State property is "Running" for all three states shown/illustrated above (the "Idle" state is for VIs that are not reserved for execution, meaning they are not in the hierarchy of a running top-level VI). Maybe I'd also add to my feature request that it would be nice if there were a way to interrogate this state using VI Server or Scripting.

Possible Solution(s)

What would be nicer is if I could ask LabVIEW to Find all Running subVIs/Nodes and visualize them by their VI Hierarchy. Maybe we could have an option to show the run state in the VI Hierarchy window. And, maybe there could be a way to only show running VIs (hide all Not Running / Idle VIs).

VI Hierarchy.png

Now, I realize that the VI hierarchy window doesn't have any way to visualize multiple subVI "instances" of a VI, but maybe that could be an option as well. Also, it would be cool if we could show "Clone" instances of reentrant VIs... but, I digress.

Also, the VI hierarchy window only shows VIs, it doesn't show nodes/functions that might be running (and what's causing my code to hang). It might be nice if we could also include nodes, at least for the purpose of helping me find out which nodes are running.

So, I'll end by just stating that I need some easier way to figure out why my application appears to have hung and I hope that this "Idea" leads to more discussion and maybe some more features in LabVIEW to help me debug and visualize my applications.

Do you have any ideas for how to better debug applications that appear to have hung? Do you have ideas for new LabVIEW features that could help?

Again, if you like my idea, please give it your kudos (vote), here in the LabVIEW Idea Exchange, and maybe it will become a real LabVIEW feature someday.


[Update 1 - Fabiola posted a great, related idea: Visualize which VIs have execution highlighting ON and be able to turn all OFF]

[Update 2 - Aristos Queue has taken the baton and run with a proposal for a compressive set of state information and debugging features in the LabVIEW Hierarchy Window]

Tags: feature request, LabVIEW

Subscribe to Email Updates

Recent Posts

Posts by Topic

see all