LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question re: display of globals in vi hierarchy

Solved!
Go to solution

I'm debugging an older (LV2009) application that was written by another developer and includes a large number of global variables (~100).   When I view the VI hierarchy for the (fairly large) top level VI and have the "Include Globals" option chosen, I notice that the icons for the various globals generally - but not always - have a number superimposed on them.  It doesn't seem to correlate with number of callers, number of instances, or level in the hierarchy, so I'm curious what it's supposed to represent?  Seems like this should be a trivial question that's easy to find an answer to, but I've checked the LV help and discussion forums, and thus far found exactly nada

 

Globals.PNG

 

Can anyone enlighten me?

0 Kudos
Message 1 of 5
(3,157 Views)

That's the real icon of the global.  Probably if you look at the global itself, they will be the exact icons of the globals.  It looks like the default icon with numbering on.  At least, that's what my experiments tell me.

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 2 of 5
(3,134 Views)

When you create a Global Variable, you end up saving it as a VI, with the default name Global 1.vi.  As with every VI that LabVIEW creates, it creates a Default Icon, and as it does for all Default icons, it assigns it a number, starting with 1.  If you create several Global VIs in one LabVIEW session, the default Icons will be numbered 1, 2, 3, ...  However, if you stop LabVIEW after creating the global with icon Global 1, and then restart LabVIEW and create another global, its VI (which must have a different name) will have the same Global 1 icon.

 

Bottom line -- do yourself a favor and modify the default icon LabVIEW creates so that the icon means something to you.

 

BS

0 Kudos
Message 3 of 5
(3,120 Views)
Solution
Accepted by topic author 04RC51

@Bob_Schor wrote:

When you create a Global Variable, you end up saving it as a VI, with the default name Global 1.vi.  As with every VI that LabVIEW creates, it creates a Default Icon, and as it does for all Default icons, it assigns it a number, starting with 1.  If you create several Global VIs in one LabVIEW session, the default Icons will be numbered 1, 2, 3, ...  However, if you stop LabVIEW after creating the global with icon Global 1, and then restart LabVIEW and create another global, its VI (which must have a different name) will have the same Global 1 icon.

 

Bottom line -- do yourself a favor and modify the default icon LabVIEW creates so that the icon means something to you.

 

BS


Actually, I think the OP already does that.  I think that's the reason for the confusion in the first place; the OP wasn't used to seeing a default icon.  In fact, I was momentarily confused until I created a global as an experiment.  Then I had a good laugh.  🙂

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 4 of 5
(3,105 Views)

@04RC51 wrote:

I'm debugging an older (LV2009) application that was written by another developer and includes a large number of global variables (~100).


If you want to make life even easier on yourself, you can have many variables in a global variable file.  If I am using globals, I tend to organized them by function.  So you might have a global variable VI for DAQ settings, another for file IO settings.  This helps keep you organized and keeps the number of files you have to mess with down.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,052 Views)