LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hidden block diagram loop?

Solved!
Go to solution

Recently a VI I've been working on for quite some time has begun running slowly.  A large delay (5-7 seconds) occurs after I connect to my target hardware before the VI continues processing.  I'm trying to figure out why, so I've made a copy of my project and have begun deleting some tabs with lots of indicators in an effort to track down the specific cause.

 

That didn't work, so I tried pausing program execution during the delay.  I expected to see it highlight in an active area of code, but instead this is what showed up on the block diagram:

hangup.png

The outer black edge blinks during paused execution.  A separate time I did this, there was much smaller black box in the lower right corner...in other words, between those 2 times, it's as though it's highlighting on a loop with a stop control in the lower right.

 

Notice also that the horizontial and vertical scroll bars are all the way at their extremes.  This is an area of the block diagram I'm not using at all.  In other words, if I manually scroll to this same area of code, there's nothing there.  In other other words, it's as though program exeuction is stopping and highlighting an area of code that is not even visible.

 

I know it's possible to hide front panel objects, but is it possible that there is block diagram code that is hidden?  What can I do to figure out what it is that is being highlighted as shown above when I hit pause?

 

Thanks in advance.

0 Kudos
Message 1 of 15
(2,957 Views)
Solution
Accepted by topic author bmishoe

You can do a block diagram cleanup (but don't save) to see ifanything was hidden.  I'd do this especially if I inherited code.  I've seen subVIs hidden behind case structures and stuff like that.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 15
(2,941 Views)

this indeed was inherited...I will try and get back with you

0 Kudos
Message 3 of 15
(2,937 Views)

ok, I think that process did indeed uncover a couple of loops...however, I have no idea how to find them in the code before cleaning up the block diagram and as you can imagine, executing 'clean up' gets things so out of whack it would take me forever to restore manually.

 

In other words - any idea how I can find this stray code?  I'm surprised it even compiles...the stray code that I found was a loop with what appeared to be disconnected wires....or at least, I made the loop bigger and bigger and never found them attached to anything...no errors when I deleted the entire loop though.

0 Kudos
Message 4 of 15
(2,934 Views)

I think you can single step through the VI and when it is highlighted, abort the VI.  It should stay highlighted.  Then use the order button to bring it to the front.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 15
(2,919 Views)

unfortunately I had tried something like that already...the problem is that it doesn't stay highlighted when I abort execution...

0 Kudos
Message 6 of 15
(2,913 Views)

You can use Ctrl+Shift+n to see if anything exists out of the visible area and you can use VI Analyzer to see if there is hidden code.  I never use VI Analyzer so I couldn't figure out what I really wanted, but it'll highlight catch wires running under stuff.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 7 of 15
(2,906 Views)

OK, using a combination of suggestions, I think I've gotten it....I found some of the offending code that was slowing my program down too, so that's good.  Thanks!

0 Kudos
Message 8 of 15
(2,892 Views)

Hmmm, maybe we need a new term for this.  Technically you could call it obfuscation, but maybe a btter term would be "code occultation."  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 15
(2,877 Views)

I'm still confused as to how my code was compiling...hidden or not, the loop that showed up when I executed "clean up" had wires that didn't go anywhere...yet they were solid colors (instead of dashed lines like when you have a broken wire)...

0 Kudos
Message 10 of 15
(2,874 Views)