Reentrant top level vi

I have a fairly large top level application vi which contains a number of non-reentrant Functional Globals.  It is a cRIO RT application.  The product which this LV application supports is modular.  That is, the end product is being expanded by integrating a duplicate set of the hardware.  From a software control standpoint, the same LV application could be used to support the expansion.  Thus, on the cRIO a second instance of the top level application vi running from a parallel loop would do the job.  However, because of the non-reentrant Function Globals this will not work because state needs to be maintained.  I see two options for a solution:
1) Duplicate the top level vi hierarchy with unique file names for all functional global vi's.  This would be very inefficient.
2) Change the functional global vi's to re-entrant, pre-allocated.  This may be the best, but has it's issues because the application calls these vi's in different places.
Any other suggestions to manage a modular architecture like this?

Here, I got it to work.
You make your functional global a non-reentrant template and you make your top level vit a reentrant vi template. Then when you launch the top level vit dynamically you will get two independent instances of the functional global. I used VI server methods but you could most likely use start async call if you are using LabVIEW 2012.
Run the Main.vi and you will see that each launched template VI increments its counter independent of the counter in the other vit.
CLA, LabVIEW Versions 2010-2013
Attachments:
vitemplates.zip ‏25 KB

Similar Messages

  • Possible to Have ToC Default to Show Only Top Level (collapse sublevels)?

    Howdy!
    I'll bet I'm not the only one wishing for this.  Let's say you're using Captivate 4's Table of Contents feature with a longish movie of Cp slides, which is chunked into bite-size sections content-wise.  In the ToC, though, you can't mimic that same organization scheme; at least, the learner would first need to collapse all the ToC folders you've created so they see only the top-level listing.
    This can be a critical issue:  keeping the at-first-glance list in the ToC brief enough to be inviting to learners, yet allowing learners to drive which details are currently visible.
    A movie's topical hierarchy could be along these lines, for example ...
    Section 1 - National Brands
    What are National Brands?
    Why Are They Important to Our Business?
    Working with Nat. Brands
    Practice Your Knowledge
    Section 2 - International Brands
    What are International Brands?
    Why Are They Important to Our Business?
    Working with Intl. Brands
    Practice Your Knowledge
    You'd like to organize the ToC to show only the section titles (1st level) and to suppress the 2nd-level detail (slide titles) until the learner chooses to expand the folder to see those details.
    I've tried things like grouping the slides into sections in the Storyboard view and organizing the slides into sections strictly within the ToC -- both to no avail.
    Has anyone solved for this need yet?
    I'm all ears, and you'd be doing learners of the world a huge favor.
    Thanks!

    Hi, Jim.
    Thanks for being 'on the case' and looking into this so quickly.  Your
    findings are encouraging, although my user base is generally working with
    IE 6 and FP8 or 9.
    Since the only thing I may influence is getting  IT to help push out FP10,
    I'm hoping it's more of a player- than a browser-version issue.
    I'll test things out by Monday and let you know the results.  Wish me luck!
    Dave
                                                                                    From:       Jim Leichliter <[email protected]>                                                                               
    To:         Dave Tressler <[email protected]>                                                                               
    Date:       03/26/2010 06:02 PM                                                                               
    Subject:    Possible to Have ToC Default to Show Only Top Level (collapse
                  sublevels)?                                                                                
    Dave,
    I just tested this on my local web server and it worked fine.  I created a
    blank project with 8 slides.  Created my TOC with grouping... 2 slides in
    each group.  I turned on self paced learning.  I tried with and without the
    widget and it picked up where I left off in either case.  See
    https://docs.google.com/leaf?id=0B86WuEq6SVwRNWIwMjhjODctMjE2Yy00MWE2LWI5YzEtMGQxYzNjOWQ0Z mI2&hl=en. 
    I published using FP10 and IE8 to view.  Notice any difference between
    your project and this one?
    Thanks,
    Jim Leichliter

  • Inactive component cost not rolled up to top level item

    Hi
    Our scenario is as follows: we have a top level item with a BOM. And some components of the BOM  are having material status u2018inactiveu2019. Inactive means materials will not procured and sold, however we could have inventory which can be consumed in production of other materials. In other words inactive items are like old items. These inactive items already have costing value. And we donu2019t want to recost inactive items.
    Having described above scenario, the requirement here is when we run costing for top level item, system should take costing value of inactive items  and roll up into top level item costing which is NOT happening now. Client donu2019t want to recost inactive items. The reason for not recosting inactive items is the recosting could change cost of inactive items significantly.  We are using 4.7 version and standard costing.
    Would appreciate any ideas or suggestions in this regard.
    thanx
    Sunil

    Thanks Young for the reply. 
    We already set 'do not cost' indicator for inactive components. And these inactive components do have standard costs valid up 10 12/31/2999.  It seems bom explosion is excluding these materials. it is ok to exclude. However the existing standard cost of these inactive components did not roll up in to top level. when I checked the costing status log, it says material ABCDF123 in plant 3344 has material status 40: Inactive.
    I checked BOM as well and inactive component is flagged as 'relevant for costing'.
    We are using following valuation varaiant
        Strategy Sequence ->  1. Planned Price 1    2.Standard Cost
        Transfer Control - Complete Transfer
    thnx

  • How do I use CreateBookmarksFromGroupTree and NOT guid in the name for my top level?

    Post Author: Barbdcg
    CA Forum: Deployment
    I have a report that I have created that uses uses groups and I wanted export a PDF using the CreateBookmarksFromGroupTree option. While that works, I get an ugly top level bookmark name that starts with the name of my report, then followed by a GUID;
    Report {49E72CC5-7FFD-44F8-831B-EA8F543F7D82}.rpt
    So, how do I Put in a name of my own choosing as the top-level bookmark or at least get rid of the guid?
    Any help or suggestions would be appricated.
    Thanks,
    Barb

    Post Author: Barbdcg
    CA Forum: Deployment
    Still no answer??? I can not figure this one out!!  HELP!!!

  • How do I use CreateBookmarksFromGroupTree and NOT get a "temp_" for my top level?

    I have a report that I have created that uses uses groups and I wanted export a PDF using the CreateBookmarksFromGroupTree option. While that works, I get an ugly top level bookmark name that starts with "temp_" then followed by two GUIDs "temp_13fef8e3-30ec-4bc5-ba77-b55d23c95e8f {87823BCB-7789-407C-8A7F-5096BE07A83E}".
    So, how do I:
    1) Get rid of this top level so it matches the Crystal Viewer (which has multiple top level bookmarks)
    2) Put in a name of my own choosing as the top-level bookmark.
    <!break>
    Any help or suggestions would be appricated.
    Thanks,
    Jim

    I would very much like to know how to avoid this also!!!

  • Front panel of a vi pops up when i start my top level vi how can i stop this

    i have a vi that whos front panel should display when the user clicks a front panel button(test instructions),
    however this vi pops up when i run the top level vi. I can manually close the vi, but how do i stop this?
    i tried modifying the Sub VI Set up properties, but that doesnt work.
    Solved!
    Go to Solution.

    Hi jknapp,
    As egraham has pointed out, you can customize the window appearance of your sub VI from the VI Properties.  If you go to File » VI Properties, then under Category select Window Appearance and then Customize..., you should be able to control how the sub VI appears.  Hope this helps!
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • How can I close all open subVI front panels, without closing my top level VI front panel when all VIs are built into executables?

    I'm using the code shown in the sample VI discussed here: http://digital.ni.com/public.nsf/allkb/353A696A3F393D9B86256E8B007A2912
    to close all open VIs except my top level VI.  My top level VI is actually a separate executable and the sub-VIs are their own executables.  All reside under the same project.  It works very well if I'm running in LabView but will not work when I build them.  I added all the sub-VIs to the Always Include box in my top level VIs properties which did nothing.  I also tried adding them to the Startup VIs box.  This allowed me to close them all programmatically from the top level VI but it also open all the VIs at once (which was expected and not desired).  I think the problem is the executables are not able to see outside their own memory space so the top-level VI never finds any other open front panels to close.  Is this correct?  Is there another way to go about doing this? 
    Thanks!

    Where do I begin…..
    I’m using a “server” to control 4 “client” PCs.  My server opens references to 4 VIs on each client then executes them sequentially.  So on a normal day, the server will run everything itself and I will have no contact with the clients.  But on a several occasions, I’ve needed the ability to walk up to one of the clients and run just one of the 4 VIs. 
    We are updating from LabView 6.1 to 8.5 and we want to run executables rather than VIs for various reasons.  I have a new VI running on the client PCs who’s only function is to initialize the shared variables and open/close the VIs.  I initially thought of making the remaining 4 VIs sub-VIs but I will loose the ability to run them individually.  I think I would also have to rewrite the VI running on the server since the 4 references it originally opened do not exist.  I don’t think you can open a reference to a sub-VI on another PC.  Can you???
     As you can see, this is a huge mess.  I’m still pretty new with LabView so any help you can provide would be great. 

  • Unable to set a top-level property object

    Hey guys
    I've made a little sequence to fetch data from a XML file. In that XML file, there is some informations (entries) (IP addresses, port numbers, etc) about 4 different types of devices(sections are the devices names). The first section of the XML tells me the NAMES of the devices I have to configure. The type of each device is located in the entries of each device. Each device has its own information and I can have more than one device of a type. In teststand, I've created custom data types (containers with empty fields) for each type of device I need.
    I want to dynamically create the devices that the XML file tells me to configure as fileglobal variables and populate them with their own config informations (entries of the XML file). I'm creating new fileglobal of the type I want using PropertyObject step and I'm creating an alias of that fileglobal that I'm passing in parameter to a subsequence who's getting infos from XML. Here, everything is OK.
    The problem occurs when I want to configure 2 or more objects of the same type. At the SetProperty step (where i'm creating the fileglobal variable) teststand gives me the error:
    "Unable to set a top-level property object to another object. Error accessing item 'Parameters.DeviceToInitStruct'."
    Is there any ways to avoid that problem and creating to variable of the same type ?
    thanks

    Hi
    I finally got rid of that problem.
    Instead of using a PropertyObject.Clone step, I used a statement who's just copy the "MasterObject" into a "CloneObject" and i'm working with that copy. So the sequence can now create devices of the same type without any conflict with the first device.
    i'll post here a short example to show how i did... maybe it'll be useful for someone...
    regards

  • Fetch Top level WBS elements for delivery type LP

    Hi everyone,
    we are working on a delivery analysis report and we are in progress of fetching sales order number for deliveries with delivery type LP.
    How we are doing?
    so we are fetch the UP values from PRHI table for the wbs elements in LIPS.
    Now we need to fetching the top level wbs elements from PRHI table by passing the UP values to the same table until the UP field value becomes initial.
    Then fetching the corresponding sales orders from the VMPA table for the wbs elements from PRHI table for the value of corresponding UP field is initial.
    So it is going through so many iteration to fetch the UP value again and again until it is initial.
    What we need?
    So if someone can suggest a FM or method to fetch the top level WBS element for the given WBS element from LIPS table will be of great help.

    Hi,
    Try FM
    'BBP_PS_PROJECT_GET_LIST
    'BAPI_PROJECT_GETINFO

  • In List View, how can I move an item from within a subfolder up to the top level of the window's parent folder?

    Up 'til now, from System 7.1 to Tiger—I skipped Leopard—you simply dragged the item onto the folder window's titlebar (since that folder's icon was, naturally, not in its own window) and BINGO! there it was, at the top level. Nothing I can think to do in Snow Leopard seems to work.

    Thanks. Most definitely does, although when experimenting I found the left window edge was closer, and 'scrubbing' the item just out of the window and back in seemed to fit the underlying file and folder metaphor better to my mind than just dropping it any old where in the window.
    And 'any old where', at any old speed doesn't always bring up the oh-so-subtle blue border that says, "I get it, you wanna add something to this window, hit me." That's The Clue. There seems to be an invisible line you hafta cross, and some kind of deliberate pace you hafta hit. Too fast and SL doesn't seem to always take it seriously. But that left edge scrub can be quite fast.
    Sorry about the over hasty denial, I was checking my facts and editting to say you were right when the board was shut for some sort of maintenance, and my bad became permanent. Please forgive.

  • How can i NOT include top level keyword in the metadata of an image?

    Hello,
    I want to know how can i NOT include top level keyword in the metadata of an image. I know there is an option for not applying a keyword to an exported image, but is there an option for not applying the top level keyword to the actual image?
    I have organized my geographical (by location) keywords like this:
    Places
    USA
    New York
    Miami
    Spain.
    If i add geographical keywords to all my images, all my images will have the keyword "Places", i dont think that it have any sence to have all your images with one keyword. How can i fix this? Any sugestion? i will appreciate it a lot any help or information that you could give me.
    Excuse my english, i know it is not good. I hope that you could understand me.
    Thanks,
    Marcelo :)

    Explicitly excluding a keyword only applies when "exporting". Unfortunately, there's currently no way to stop the keyword being written to the file when "Save Metadata to File" command is used. The natural reaction of users to this difference is to suggest that it is stupid. Nevertheless, there are good reasons why the difference exists:
    1. "Export" creates a new file whereas "Save Metadata to File" writes the metadata back into the existing file.
    2. There are very good reasons why certain keywords should not be written to file, and the example given in the OP is one. Saving metadata to file is more often used as means of backing up important image related metadata, independently of the catalog or allowing the metadata to be visible in other aplications. It would be rare that such a file would be shared with a third party, so the reason for not including certain keywords is less obvious. Actually, not including it can result in no end of confusion and grief. For example, if the top level (or any keyword) was excluded during the save metadata process then the other keywords would be orphaned when image is imported back into the catalog (e.g. buiding a new catalog).
    The development team are aware of the need, in some circumstances, to exclude certain keywords when save metadata command is used. How and when the issue is resolved, without adding even more confusion/complexity, is some way off.

  • Getting at a top-level XML attribute

    It's Friday afternoon... I'm fried and can't seem to figure
    out how to get at a top-level XML attribute.
    Some specifics...
    My XML doc has a single attribute in the top node followed by
    several "version" nodes
    <projData projectName="Spry Project">
    <version>
    I successfully load and create an xml data set from said XML
    file. Later on, I use the getDocument() method to refer to the XML
    DOM doc used by the original xml data set. I need to extract the
    value of the attribute "projectName" into a javascript variable.
    The xpath query should be "projData/@projectName" but all I
    get returned is an undefined value.
    Any ideas? I'm sure it's something simple that I'm
    overlooking.

    > can you please helo.
    This is impossible.
    Obviously your ABAP mapping is wrong. Fix it.

  • How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi?

    How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi? There is probably a trivial, easy way to get this info, but I have not yet found it!  Thanks..

    Or if you want to grab all the paths programatically, try the attached VI.
    Open the top level that you want all the paths from and close all others, then open the
    attached and run it. It will return an array of all the VIs that the VI
    in question uses, including vi.lib VIs. You can filter these as well if
    you like.
    Ed
    Message Edited by Ed Dickens on 08-01-2005 07:01 PM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    Get all paths.vi ‏29 KB

  • A top level menu item should display its active state if any of its submenu items are active

    Example case: I'm designing a Muse site which is basically a portfolio of our work. We design books, doing page layout and covers. We have numerous book categories and sub categories which I put in a horizontal menu. When a given top level category menu item doesn't have a submenu, it is a hyperlink and it displays active state when the browser displays its linked page. But when a given page is displayed from a submenu link, its top level menu item does NOT display active state. I think it should.
    For example, we have a "Nostalgia" category which has "Film" and "TV" subcategories. Because the menu item, "Nostalgia" has a submenu containing "Film" and "TV", the label "Nostalgia" is not a hyperlink. The submenu attached to it has the two hyperlinked items "Film" and "TV". When the browser is displaying either linked page, the submenu is hidden. So it would be nice if the top level item, "Nostalgia" would display in an active state.

    Hello Daniel,
    As of now this feature is not there in Adobe Muse.
    I would suggest you to please log this as a feature request in our "Ideas for features in Adobe Muse" section. (http://forums.adobe.com/community/muse/ideas)
    Hope this helps.
    Regards,
    Sachin

  • Show a menu of roles in the Top Level Navigation

    Hello,
    Imagine a scenario where a user has many roles assigned to him (say 40 roles). In that case the user will have 40 tabs in the first level of the top level navigation and by default a horizontal scroller appears on the right part of the screen clicking on which the roles will scroll horizontally. If the user has to go to the 40th role he has to click quite a lot.
    Is it possible to have a menu option clciking on which we get the all the list of roles in the top level navigation in a vertical list and we can directly jump to any role clicking on the entry in the list ?
    Something like what we get in a tab strip in Web Dynpro.
    Thanks in advance for your valuable inputs.
    Sundeep
    Edited by: Sundeep Sethi on May 3, 2011 3:00 PM

    Hi,
    Yes it is possible to have menus as you wish .
    Look at the following links
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6066b302-09c8-2a10-a894-eb9fef30df85
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a1aea5-a2d1-2a10-c6bc-953bdadfdcb8?QuickLink=index&overridelayout=true
    You need to work on navigation tag libraries to extend number of levels .
    The above inks helps you only for single level of navigation.
    Regards
    Karthiheyan M

Maybe you are looking for