Why does LabVIEW allow me to have 2 controls with same name

Here's a general LabVIEW question:
Why does LabVIEW allow me to have 2 controls with the same name in the same VI?  It seems like this only increases the chances of confusion.  Especially when someone is just looking at a block diagram (or documentation of a block diagram).
No other programming language that I know of allows this.  I realize that uniqueness of name is not as critical in LabVIEW as it is in any text based language.  For example, in a text based language, if I had 2 variables called abc and I wrote a statement
abc = 12;
the compiler would not know which abc was being referred to.  In LabVIEW, if we had 2 controls called abc, the equivalent of doing an abc=12 is writing to a local variable (which is always linked to one of the controls) and there is no ambiguity.  Still, someone looking at the code cannot figure out which abc is linked to unless he does a right click>>Find>>terminal (or a double click).
Even though I have never and never will name 2 controls the same, I think it would be a nice constraint to see enforced by LabVIEW.
Any input from NI engineers on this?
Message Edited by S G on 12-18-2007 03:38 PM
S G
Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
Attachments:
Trial1.JPG ‏21 KB

I know when you copy and paste a control or indicator, LabVIEW automatically increments the label. But since you can hide the label, and show or hide the caption, there must be another mechanism that LabVIEW uses to keep track of all the controls. I thought I remember back in the "old days" (ver 6 or 6i) LabVIEW would give you an error if you tried to make two controls with the same name. Perhaps that was LabWindows/CVI.
I don't know where the index is actually stored, but if you look at a property node linked to the Pane, you will see an array of references to the controls and indicators. Since the references are stored in an array, I assume that any local variables are tied to the index of that array. Since the labels themselves are properties of the control, I guess there's no reason to limit what that label is. They all have a unique index number.
Interestingly, this array of references grows from the beginning. That is, any new control or indicator is put at index 0, not the end of the array.
B-)
Message Edited by LabViewGuruWannabe on 12-18-2007 08:45 PM
Attachments:
Labels.png ‏12 KB

Similar Messages

  • Why does Labview allow a cursor in a indicator?

    Hello,
        Why does Labview allow the user to position the cursor with the mouse inside a numeric indicator? Users think that just because they can put a cursor they should be able to type something and enter data. Is there a way to disable/stop the user from putting the cursor in a numeric indicator?
    Regards,
    Kaspar
    Solved!
    Go to Solution.

    Disabling the indicator satisfies your requirements, but this is funnier.  It would be even better if I calculated the position of the indicator and the "entry point" and just kept the mouse from entering, but I have a project to finish... 
    Message Edited by jcarmody on 03-27-2009 11:58 AM
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    move.png ‏4 KB
    test.vi ‏9 KB

  • Why does LabVIEW for Lego Mindstorms have 2 Functions Palettes?

    LabVIEW for Lego Mindstorms has 2 separate Functions Palettes.  One of them appears when one creates a VI (.vi) for a Project (.lvrbt), and it appears to contain Mindstorms NXT functions.  The other appears when one creates a stand alone VI (.vi), and it contains functions which are labelled "NXT Robotics" but which appear to be the old Mindstorms RCX functions.  For example, the Motor Functions have no Speed or Duration controls.  (See Control Palette pictures on the attached Word document.)  (NI should be aware that the RCX is no longer sold or supported by Lego.)
    If I only want to create a stand-alone VI, how do I access mature NXT functions with which to implement that VI?
    Attachments:
    NI LabVIEW Function Palettes.doc ‏127 KB

    I knew that the NXT could be controlled from a "remote" device (e.g. cell phone), though perhaps "remote" is a poor choice of words given your use of the word "direct" which, as you use it, has the same connotation.  I have never run the NXT in the direct mode, nor have any of my team members.  The reason I assumed that you had included RCX functions was RCX functions had fewer properties than NXT functions just like your "direct" functions do.  I have no idea where the "dual mode" functions are to be found.
    I think LVLM has inadequate introductory documentation.I have Gasperi's book, but like NXT-G books, he only gives recipes for robots with different functionalities.  LVLM needs a better structural and functional description.
    Lego Education is not supporting LVLM (nore is NI, for that matter, at least not very well...it was a lot of work to get to someone who knew what they were talking about).  The guys at Lego Education are not in a position to support LVLM.  Your guys also asked me to call "Tom Barrowman," Lego's New England sales rep.  I didn't call him, but I am betting that he knows even less.
    I understand why NI doesn't want to put the support bucks into LVLM.  The license for LV cost $2500/year, and I bought LVLM for $100.  LVLM was intended to be an introductory product for people (kids) who might become NI customers someday, but if those kids walk off in disgust because they can't figure out how to use LVLM, NI's investment in it will have been for nothing.
    Attachments:
    For Ethan.doc ‏66 KB

  • TS3276 why does apple deny that they have trouble with some hotel wireless connections that prevent us from sending mail?

    This morning I had no trouble sending mail from ALB.  Then I did have trouble at the Marriott in Baltimore.  This is a recurrent issue.  Some hot spots work fine, some only allow me to retrieve mail, but not send any.  More than frustartiong as it denies me working ability with mail on the road!

    I have noticed this too because I work a lot overseas and live out of many hotels.  This is not just a Mail issue but also with Outlook, and it has to do with your outgoing port configurations.  It's not Apple's fault it is the ISP behind the wifi and some of these ports are blocked for whatever reason.  The only thing that I do is try different mail accounts, ie Yahoo, Google, Mac, until you find one that works.  Sounds stupid but that's the only way that
    I can keep communicating back to the US.

  • Why does labview 2009 32-bit closes up with no error message?

    Hello.
    I am developing an application using a PCI-6534 board, Windows XP SP3, and LabVIEW 2009 32-bits. In this application I am generating a 300 Hz signal using the P2.0 digital line. I am trying to make digital acquisition using the P0 port (8 bits), using N-sampling. The program that generates the 300 Hz clock, works with no problem. However, when I start running the program that performs the data acquisition, LabVIEW suddenly closes up with no error message. The LabVIEW windows just disappear from the screen.
    As for me it looks like a LabVIEW bug.
    In case anyone decided to help me, I could attach the programs so that you could check them.
    What can I do to solve this problem?
    Thank you.

    I had the same problem with one of our applications. I supplied gigabytes of process monitor and desktop execution toolkit logs, but nothing was resolved. I upgraded from WS2003 and LV2009sp1 to W7 64b and LV2010, per NI's recommendation but the problem persists.  I had the corresponding service ticket open for 3 months where NI said the application ran fine for them on W7 with 2010. (long story) 
    I understand your frustration, and I recommend getting your local application engineer involved as an advocate with application support.. If you pay for service, pound on them to provide it. My $0.02.

  • Why does apple ipad and iphone have problems with comcast?

    We attempt to send pictures through our comcast wifi account and gets to about 90%and freezes. Have reset modem, and router, have turned off phone and reset it. Have switched to 4G then pictures will send. Only has problem when connected to wifi. As my ipad is wifi, I cannot send pictures at all with it.
    Did not have this problem until iOS 6 update.
    Any suggestions?

    My iPad and other devices have no problems with Comcast, but I didn't get my WiFi router from them. If you did, your router may need a firmware update, or you may need to get a different model of router.
    Regards.

  • Why does the iPad Mini not have music play count?

    I bought an iPad Mini and also have a macbook. I had listened to various music on my iPad Mini the other day, however when I connected the iPad Mini to the Macbook and iTunes via the lightning connector to sync, it synced the ratings I gave the songs I listened to on the mini, but no play count, as if I had not listened to anything. I hope there is something I can do about this as I often look at my play count!!

    Katrina UK
    It should work work but these kind of bugs pop up between updates, both hardware and software. Try closing all apps in the recently used list on the iPad. Double tap the Home button, tap and hold one of the icons at the bottom till they wiggle then tap the to close them. Tap the Home button to get back to the Home screen then hold the sleep button till you see the slide to power off message. Once it has powered down completely hold the Sleep button till the Apple icon appears.
    tomyiiii
    Re: Why does the iPad Mini not have music play count? 
    Nov 18, 2012 11:34 AM (in response to Katrina UK)
    Does it even really matter...?
    Many people including myself rely on playcounts to control smart playlist to manage large libraries. Smart playlists can be created to show your most or least played tracks and used more or less as your favorites or other uses. Along with playcounts the date is transferred so to keep a fresh list of music on my smaller iPods a smart playlist set to songs not played in the last month keeps some fresh tunes on it.
    Playcounts are also used to manage Podcasts in iTunes to delete older episode. Bookmarks, which can also be effected by this, can mess up audiobooks, movies and podcast playback between different devices. So yes, it does matter.

  • Why does a new desktop creation unexpectedly initiate with a background differing from the originating desktop? How can I control or eliminate this behavior?

    Why does a new desktop creation unexpectedly initiate with a background differing from the originating desktop? How can I control or eliminate this behavior?

    CT, I suspect that I either mistated the question or don't understand how to set the default back ground.  In any case, with the background that I have set in system settings, and this is the background to which my sessions consistantly boot, new desktops come up for the second or up to the third background with this initially set background. Then in the third or fourth desktop creation (I seldom go beyond four), the background for the new desktop, is one that I was using one or two months ago...

  • How many sessions does SAP allow you to have ??

    Dear Memebers,
    How many sessions does SAP allow you to have ??
    a) 3
    b) 6
    c) 9
    d) 12.
    I guess the right answer is B and C but in choices I have to select only 1, which answer will you pick and Why ??
    Thank You.
    Madhu.

    > I wanted to know for sure what is the answer.
    Hi Madhu,
    If you are going to ask questions such as these, then please indicate that you have searched and what you do already know and where & why you have a doubt somewhere which is worth discussing in the forum or sharing opinions or experiences on.
    Just asking for the answer only so that you don't feel too alone when answering 6 in the interview is of little value.
    Normally such "answer a, b, c, or d only or be quiet"-type-threads (like certification tests are) are deleted. That is the rules, and we have them for a reason.
    Anyway, you guys seem to have sorted this out amongst yourselves so there is no reason to interfere here IMO. Thanks for that.
    Cheers,
    Julius

  • Why does apple allow apps in the App Store hijack your Internet when certain websites? Why doesn't apple remove their products from the App Store?.

    Why does apple allow apps in the App Store hijack your Internet when certain websites? Why doesn't apple remove their products from the App Store?.

    Apple saw it as their responsibility since the redirection took me to the App Store. They assisted me in stopping the redirection which is occurring on many peoples iPhones. It's a have java script problem that adking is using to get you to buy their games. The websites work normal and then all of the sudden the website is taken over by adking.com.  You can no longer use the website as it immediately takes you to the App Store without ever showing a popup to cancel the redirection. They were very helpful fixing the problem should others experiencing this specifically with adking.com.
    No need to get defensive. I'm not the only one experiencing the problem Apple said.

  • Why does my itunes crash after start up with an "APPCRASH" error every time i open it?! I have been trying to fix this for weeks but all i can do it re-install it every other day which does nothing!

    Why does my itunes crash after start up with an "APPCRASH" error every time i open it?! I have been trying to fix this for weeks but all i can do it re-install it every other day which does nothing! I am desperate to get access to my itunes to get music on my phone and all of this just makes me want me to sell my iphone since there is no other way to add music to my phone. If things go get sorted soon you can say goodbye to my support.

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • When trying to send E-mail via AOL i get the message "rejected by the server because it does not allow relaying" I have checked settings as per answers to similar question

    When trying to send E-mail via AOL i get the message "rejected by the server because it does not allow relaying" I have checked settings as per answers to similar question

    From which account does the email not send?  When sending from an account, the iPad will first try to use the aoutgoing server for that account.  If it can't it will try the other accounts listed.in the setting on the iPad for that account.  It soulds like the server for the account is not working and that the alternate server is resjecting the messag since it did not originate ffrom the account associated with that server,  That is to prevent sending spam.

  • Why does my 8GB Ipod Touch have Voice Memos?

    Why does my 8GB Ipod Touch have Voice Memos?  According to Apple's manual the Voice Memos will only work on the 32GB Ipod Touch.  The old 8GB does not have a microphone.

    The Apple Users Guide for the the iPod w/ iOS 4.2.1 says the the 2G, 3G and 4G  iPod have voice memos but you need an external for the 2G and 3G models since they do not have an internal mic.  No info on 8 GB model not having VM.  You can get the Users Guide from the iBook store.

  • Why does my App store just have question marks where pictures should be?

    Why does my App Store just have question Marks where the picture of the app should be

    When you log in with a new device, Apple asks security questions and will email you to make sure it is not an unauthorized access to your account.
    We are not Apple support, we are a forum of fellow users.
    You can change your information anytime in your iTunes account.
    http://support.apple.com/kb/HT5312

  • Why does my inbox say I have a email but when I open inbox no email

    Why does my inbox say I have a email but when I open inbox no email

    Do a reset, hold down the home/power button until you see the apple logo and then release, then wait for the phone to boot back up.

Maybe you are looking for

  • OK HERE IS WHERE I AM AT HARD DRIVE WENT DOWN UPGRADED TO A 250 GIG AND NOW NEED TO KNOW HOW TO INSTALL OSX ON THE POWERBOOK G4 17

    I have a powerbook g4 17 and it recently went down the hard drive sounded like it was eating itself so i replaced the hard drive with a 250 gig and now i need help on how to get osx onto the powerbook it will not boot from disk i will start all the b

  • Display Adobe Form in Module Pool Screen

    Dear Friends , Is it possible to display adobe form in Module pool screen using Custom control. What  is the use of the class CL_GUI_ACF_BASE . Pls give suggestion . Thanks and Regards Krishnan R.

  • Motion tween w\button

    EVERYTIME I MAKE A MOTION TWEEN, WITH A BUTTON, THE BUTTON NEVER WORKS. ANY SUGGESTIONS??

  • Wait_time -1 in oracle session

    Hello Friends, select seq#, event, username, osuser, wait_time, seconds_in_wait, state, schemaname, process, blocking_session, status from v$session where type='USER'; SEQ# EVENT USERNAME OSUSER WAIT_TIME SECONDS_IN_WAIT STATE SCHEMANAME PROCESS BLOC

  • Wifi hardware not detected

    After upgraded to Lion OS yesterday and after some software updates, I always have to restart once when I start up my iMac to allow the wifi hardware to be detected automatically. On a fresh boot-up, the iMac will take a long time to boot up and will