How do i create and pass a global variable from one vi to several sub-vi's?

Hi Guys,
I am trying to create a program that opens several front panels (sub-VI's) in sequence. in each front panel, the user would open a file that the name is obtained from the previous sub-VI. I would like to know how i could pass the filename and refnum of the file thorough from one sub-vi to another. A global variable would do it in VB, but how do we do global vars in LABWIEW. thanks
Papish

I put together a sample VI and Sub VI that illustrates how to pass a Refnum and access a data file while in a Sub VI.
For multiple VIs just repeat the sub VI process.
You probably don't wanna use a Global Variable if not needed (can add to the mess down the road haha).
Let me know if it helps you out! Or if I can clarify anything else!
Chances are if you have seen VI in the forest it hasn't fallen.
Attachments:
Passing Refnum.zip ‏21 KB

Similar Messages

  • How can I programmatically create and use a global variable?

    I have an app where the number of AI DAQmx tasks I create are specified in a config file.  I have a monitor task that periodically looks at the latest values from all DAQ tasks.  I've been doing this with a set of global variables because it was the simplest way to do it.  But to do this, I have to explicitly create a separate AI task that uses the hard-coded global variable name for the DAQmx samples.  I would prefer to only write one VI for the DAQ loop that writes to a global variable that I programmatically create based on the config file.  The only solution I can think of is to use a global variable "pool" that is sized bigger than I expect to need, and then have a big switch case to select which one I want based on the task index.  But this sounds pretty silly.

    I tend to agree with Ben. I don't buy the concept of taking the asy way out (globals) because it very rarely will things remain static. You almost always have to extend the features and functionality of an application and then you will run into issues with sloppy and lazy implementations. The solutions offered may require a little time to learn but once you do it doesn't really require any extra effort.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How can I create and design a page UI from blank page in jdev10g?

    Hi.
    How can I implement a page from scratch page?
    I can create a master-detail page as the OBE site.
    But I'm not sure how to create page using component pallets, instead drag data-control model to page.
    It means I should design UI with component pallets,
    How can I do?
    Thanks.
    Edited by: user10615931 on 2009-8-18 上午4:13

    Thanks.
    It is helpful to me.
    What I want to do is use component pallets and add action to the component for creating a page instead using executeWithParam operation and drag view object from datacontrol to create page.
    How can I do?
    Thanks

  • How to pass a bind variable from one SQL Report to Another

    Hello~
    I've created a link on one SQL Report page (Page 1). I would like a value from Page 1 used in the SQL on Page 2 to determine the result set. The Where Clause in SQL Query containing the bind variable is as follows:
    AND hp.party_name     = ':District_Account'
    When I run Page 1 and click on the link to execute Page 2, I get 'No Data Found'. The setup of the link is as follows:
    Column_Name = District_Account
    Link Text = #District_Account#
    Target = Page in this application
    Page = 2
    I'm a rookie working in V1.6...any help would be greatly appreciated!
    Thanks,
    Becky

    I don't see any parameter being passed in that URL. A little sample: http://htmldb.oracle.com/pls/otn/f?p=33203:4<br>
    when you click on the edit link the URL looks like this:<br>http://htmldb.oracle.com/pls/otn/f?p=33203:5:16073998852455071705::NO:5:P5_TABLE_NAME,P5_OWNER:PRESIDENTS_THEMES%2CBLUETEST<br><br>
    where P5_TABLE_NAME and P5_OWNER are the items and PRESIDENTS_THEMES and CBLUETEST are the values.<br><br>
    The SQL on the filtered report looks like:<br>
    SELECT *
    FROM all_tab_cols
    WHERE table_name = :P5_TABLE_NAME
      AND owner = :P5_OWNER<BR><BR>

  • How do I copy and paste a gradient color from one document and then use the gradient on another document?

    I am making business cards. On the back of the cards there are two lines with gradients. Below is a card with a magenta gradient. I want to select both lines and change the magenta gradient to the orange gradient from the file below. How do I do this? (I do not want to copy a paste the orange lines and then move them over the magenta ones.) I just want to select the magenta lines and change their color to the orange gradient. This will insure absolute alignment. I want to do repeat the process with several other gradients too. Thank you.

    David,
    As I (mis)understand it, you may:
    1) Copy one orange gradient path to the magenta gradient path document;
    2) Select the two magenta gradient paths and change the Fill to None;
    3) Select the orange gradient path;
    4) Select the two magenta gradient paths and change the Fill to Gradient.
    That should give you the desired replacement. For multiple use of the same gradient, you may consider a gradient swatch.

  • How do I create, and send a group email on my iPhone?

    How do I create, and send a group email from my iPhone 4?

    How to send group email without additional APP
    Just spent an hour on ichat.  Long and short....can't send group email.  The group name appears in the TO: line, but if you click on the group name, only the first email address is blue..the rest are black and will not get the email.  We tired using the CC and BC lines...same result. 
    However here is one solution:
    I sent one email with each of the group (we are only 9 ) in the TO: line.  I included my primary email.  When it came to the iphone, i moved it to one of the subfolders.  (Each account you may have has a list of the inbox at the top and Account at the bottom.  ... that is where you can access the subfolder)
    I moved the email with all names to that subfolder.  I can then, open it ...do a relpy to all and just change the message and subject line.   It is cumbersome, but it does work.  I really think Apple, a company committed to ease of use, needs to review this flaw.  I suspect it may be a bandwidth economy ....  and i feel the pain of the providers...but you did create the beast. 

  • Re: How do you create and use "common" type classes?

    Hi,
    You have 2 potential solutions in your case :
    1- Sub-class TextNullable class of Framework and add your methods in the
    sub-class.
    This is the way Domain class work. Only Nullable classes are sub-classable.
    This is usefull for Data Dictionary.
    The code will be located in any partition that uses or references the supplier
    plan.
    2- Put your add on code on a specific class and instanciate it in your user
    classes (client or server).
    You could also use interface for a better conception if needed. The code will
    also be in any partition that uses or references the supplier plan where your
    add on class is located.
    If you don't want that code to be on each partition, you could use libraries :
    configure as library the utility plan where is your add-on class.
    You can find an example of the second case (using a QuickSort class,
    GenericArray add-on) with the "QuickSort & List" sample on my personal site
    http://perso.club-internet.fr/dnguyen/
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    http://perso.club-internet.fr/dnguyen/
    Robinson, Richard a &eacute;crit:
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Richard,
    Your question about "utility classes" brings up a number of issues, all of
    which are important to long-term success with Forte.
    There is no such thing as a static method (method that is associated with a
    class but without an implicit object reference - this/self/me "pointer") in
    TOOL, nor is there such thing as a global method (method not associated
    with a class at all). This is in contrast to C++, which has both, and
    Java, which has static methods, but not global classes. Frequently, Forte
    developers will write code like this:
    result, num : double;
    // get initial value for num....
    tmpDoubleData : DoubleData = new;
    tmpDoubleData.DoubleValue = num;
    result = tmpDoubleData.Sqrt().DoubleValue;
    tmpDoubleData = NIL; // send a hint to the garbage collector
    in places where a C++ programmer would write:
    double result, num;
    // get initial value for num....
    result = Math::Sqrt(num);
    or a Java programmer would write:
    double result, num;
    // get initial value for num....
    result = Math.sqrt(num);
    The result of this is that you end up allocating an extra object now and
    then. In practice, this is not a big deal memory-wise. If you have a
    server that is getting a lot of hits, or if you are doing some intense
    processing, then you could pre-allocate and reuse the data object. Note
    that optimization has its own issues, so you should start by allocating
    only when you need the object.
    If you are looking for a StringUtil class, then you will want to use an
    instance of TextData or TextNullable. If you are looking to add methods,
    you could subclass from TextNullable, and add methods. Note that you will
    still have to instantiate an object and call methods on that object.
    The next issue you raise is where the object resides. As long as you do
    not have an anchored object, you will always have a copy of an object on a
    partition. If you do not pass the object in a call to another partition,
    the object never leaves. If you pass the object to another partition, then
    the other partition will have its own copy of the object. This means that
    the client and the server will have their own copies, which is the effect
    you are looking for.
    Some developers new to Forte will try to get around the lack of global
    methods in TOOL by creating a user-visible service object and then calling
    methods on it. If you have a general utility, like string handling, this
    is a bad idea, since a service object can reside only on a single
    partition.
    Summary:
    * You may find everything you want in TextData.
    * Unless you anchor the object, the instance will reside where you
    intuitively expect it.
    * To patch over the lack of static methods in TOOL, simply allocate an
    instance when required.
    Feel free to email me if you have more questions on this.
    At the bottom of each message that goes through the mailing list server,
    the address for the list archive is printed:
    http://pinehurst.sageit.com/listarchive/.
    Good Luck,
    CSB
    -----Original Message-----
    From: Robinson, Richard
    Sent: Tuesday, March 02, 1999 5:44 PM
    To: '[email protected]'
    Subject: How do you create and use "common" type classes?
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance

  • HT201394 I just updated my iPhone 4s to iso 8.2  How do I create a pass code to open my phone without using my password every time?

    I just updated my iPhone 4s to iso 8.2  How do I create a pass code to open my phone without using my pass word every time?

    I couldn't find the edit button on my original post so I am posting an update here.
    I have gone through more apps and have had good luck on all but one more.  And it's not that the app doesn't work, I am talking about the Yahoo Weather app, It works fine, but when you swipe between cities the screen lags a bit and it sometimes doesn't move between pages the way it should.  On iOS 7.1.2 it was smooth as butter but on iOS 8.0, not so much.  I will post a note in the app store to let them know.  I really like the Yahoo app better than the new stock app.
    I have been going through my games and they all work fine. Angry Birds (Original and Stella), Canabalt, Minecraft, Bejeweled 2, Silly Walks, PopWords, Doodle Jump, Deep Green all seem to work just fine. 
    Starbucks app works as it should. 
    I will stop back again next week after I have had the weekend to play with it in detail and post my thoughts again.

  • How can I edit my website from another computer? and how can I create a new website next to the one, I have already? Can anyone help, please?

    How can I edit my website from another computer? and how can I create a new website next to the one, I already have? Can anyone help, please?

    Move the domain.sites file from one computer to the other.
    The file is located under User/Library/Application Support/iWeb/domain.sites.  Move this file to the same location on the other computer and double click and iWeb will open it.  Remember, it is your User Library that you want and not your System Library, as you will not find iWeb there.
    Just create a new site on the same domain file and it will appear below the other site.  If you want them side by side then duplicate your domain file and have one site per a domain file and they can then be side by side.

  • How to accessed,created and modified date of particular file in java

    Hi,
    I am facing one problem.
    I know how to get the modified date/time of file in java.
    but i don't know how to find created and accessed date/time of file in java.
    Thanks,
    Tejas

    I guess thats not possible in in Windows.
    But if u r trying it on a unix machine.
    You can use Runtime class to call exec on the command
    ls -l filename
    and then store the result in a file . And then take out the last modified time. But you cant get created time.
    Thats a clumpsy way i believe.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • HT201441 how can i create and audio cd from a music track I have on my ipod

    how can i create and audio cd from a music track I have on my ipod

    This is how:
    Go to:
    'File'
    'Share'
    'Quicktime'
    'Expert Settings'
    'Audio as AIFF' or pick your brand of compression.
    Drag and drop the resulting file into iTunes.
    Enjoy!
    P.S. - You didn't need to delete the video but I think that'll be okay.

  • Using macbook pro, how do I create and print labels

    how do I create and print labels using macbook pro

    Do you mean address labels ? Please check out this link
    http://smallbusiness.chron.com/can-print-address-labels-macbook-pro-58714.html
    http://support.apple.com/kb/ht3952

  • How do we create and publish templates in SRM ?

    Good day guru's
    How do  we create and publish templates in SRM , for contracts management ?
    Your help will be appreciated

    Hi,
    What is your SRM version?
    There are 3 buttons (Create, Create template, Create from Template) in the Process Contract screen, bbp_ctr_main in SRM50 (SRM_SERVER 550).
    Regards,
    Masa

  • How do you create and save icc profiles using photoshop?

    How do you create and save icc profiles using photoshop?

    You don't. Color profiles require specific measurement hardware and software.
    Mylenium

Maybe you are looking for

  • How to read XML Data stored as Clob

    Hi I am new to clob & XML types... An XML data has been inserted into a Clob field in a Oracle(9.2.0.8.0) Table CREATE TABLE TEMP SNO NUMBER(5), STR_VAL LONG, CREATED_DT DATE DEFAULT sysdate, COL2 CLOB, COL3 SYS.XMLTYPE SELECT dbms_lob.getlength(col2

  • What adaptor do i need for my iPhone 5 to make it work with a Phillips Music dock??

    Hi there, my iPhone 5 is due delivery tomorrow i have the 64 gig white version on Vodafone coming i still have the 4S model and i have a Phillips music dock system what adaptor do i need to plug in to my iPhone 5 so that it will fit and actually work

  • Broken Multitouch in 10.7.2?

    I keep Mail at fullscreen in its own space. In previous versions of Lion, I could drag a file into an email in two ways: by click+dragging the icon with my mouse and 3-finger-swiping the trackpad to switch spaces by click+dragging the icon with my th

  • What is boot camp? can i install it on my pc?

    sorry for the noob question but, i get the impression boot camp allows you to run windows on your mac. can you get it for the pc? if so what does it do for the pc? thanks!

  • Half my icons are missing, including settings and safari

    When i turned on my ipad the other day, most of my app icons were missing. I cant reset through settings because the settings icon is also missing. When i search for settings, nothing comes up. anyone have any ideas?