Sub Panel and References

Hi
I've a Main.vi including one sub panel to run two different SubVIs sequentially.
In SubVI1 I want to create a reference that I can use in SubVI2.
How can I pass the reference from SubVI1 to SubVI2 so that it is still valid in SubVI2?
I try to do this with a functional global but inside SubVI2 i get the error message: 1025.
(see attached example)
Laschko
Solved!
Go to Solution.
Attachments:
SubPanel_and_Ref.zip ‏31 KB

Laschko wrote:
How can I pass the reference created in SubVI1 to SubVI2 if I must stop the SubVI1 before SubVI2 starts?
You can't. I didn't look at your code, but I'm guessing this is the problem you have.
Generally, LV automatically destroys a reference when the hierarchy it was created in goes idle. The hierarchy is determined by the top level VI, which is either a VI where you press the run arrow or a VI you run using the Run VI method (which I'm assuming is what happens in your case). Today there is no way of disabling this behavior. Hopefully in the future NI will change it so that references are only destroyed when no one actually uses them.
The only way to handle this today is to make sure the reference is first created in a hierarchy which will stay in memory. This can be either your main hierarchy or a daemon which you call in the beginning and has the task of creating the references.
Try to take over the world!

Similar Messages

  • Loading independent sub vis in sub panels and calling from main vi

    Hi all,
    I have trying to work on the following requirement.
    I have a main vi with a file browzer and sub panel - Channel . I will select a channel configuration text file which contains Analog and digital channels names. ''
    My vi will read that file and loads and Channel VI in the sub panel - Channel.
    Now the CHANNEL VI has a tab control with 2 pages analog and digital. Each page again has sub panels i,e. sub Panel - Analog and sub-Panel-Digital.
    Analog VI with some knob controls which are binded to Signals are displayed in the sub Panel - Analog.
    Digital VI with some boolean controls  which are binded to Signals are displayed in the sub Panel - Digital.
    These vis will show the values acquired from the hardware.
     I want to provide the user to load any channel configuration file and acquire the data. For the first time the execution is working fine. The next time when I tried to load a new configuration file. it says "Invoke node in main cvi <Append> Method Name <b>Run VI</b> and the new configuration is not loaded.
    The following logic is implemented as a sub vi to load and close the sub panel vi.
    VI Load logic:
    VI CLose Logic
    So please let me know where am i doing wrong.
    Before loading the new configuration file Iam calling the close logic . But still is not working.
    Thanks in Advance.
    Ramesh.

    Can you post a vi snippet? It would be helpful to see your logic flow, I'm wondering if your problem is that you've got "remove vi" node at the end after you have already closed the vi reference - but can't tell if same vi reference are used as in the case of top diagram.
    -DP
    New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI

  • ActiveX controls disappear when VI is loaded in a Sub-Panel with Start Modal Dialog usage

    Hi,
    I have a subpanel in a VI (VI1) in which another VI (VI2) is loaded. VI1 is used as a module for an Action step in TestStand. VI2 has ActiveX controls like ExpressionEdit and Adobe PDF reader etc. VI1 loads VI2 in a sub-panel and calls Start Modal Dialog.vi. I have set 'Show front panel when called' to true for VI1 so that the VI pops up when the sequence is run. When the sequence runs and when the Start Modal Dialog VI is called from VI1, all ActiveX controls in VI2 (loaded in the sub-panel) disappears. Here is the screenshot of the frontpanel of VI1 when the sequence is run:
    This problem occurs in TestStand 4.2.1, TestStand 2010 and TestStand 2010 SP1 (as far as I have tested. May occur in older versions too). In the attached file, VI1 is 'ExprEdit Test.vi' and VI2 is 'SubpanelLoad.vi'. The attached sequence is developed in TestStand 2010 SP1.
    How can this issue be solved?
    Thank you,
    Ganesh Kumar
    Solved!
    Go to Solution.
    Attachments:
    Subpanel Load ExpressionEdit problem.zip ‏23 KB

    Hi,
    An update on this issue: I tried changing the order of loading the VI in the SubPanel and the start modal dialog. I called start modal dialog and then loaded the VI (VI2) in the SubPanel. When I ran the sequence, the activeX controls did not disappear (I was pretty sure that the ActiveX controls in VI2 would not disappear since I am calling Start Modal Dialog before loading the VI in the Subpanel). Then I just changed the sequence of operations back to the previous order (loading the Subpanel with the VI and then calling the Start Modal Dialog). When I ran the sequence, the activeX controls where still displayed. But when I ran the sequence with the VI1 backup (that I had taken before making all these modifications) the activeX controls were not displayed. I a nutshell, I now have 2 versions whose codes are the same. But when I run the sequence with action steps for these VIs, the activeX controls disappear when the unmodified backup VI runs and does not disappear when the modified VI is run. I have attached the files that I used along with the sequence file. The details are as follows:
    ExprEdit Test (Not Working).vi - The unmodified backup VI for which the ActiveX controls disappear.
    ExprEdit Test (Working).vi - The modified VIs in which the ActiveX Controls do not disappear (But same code as ExprEdit Test (Not Working).vi).
    ExpreEdit Test.seq - The sequence file containing 2 action steps one each for theabove mentioned VIs.
    SubpanelLoad.vi - The VI that contains activeX controls and is loaded in the SubPanel.
    Note that the sequence is created in TestStand 4.2.1.
    Thank you,
    Ganesh Kumar
    Attachments:
    Subpanel Load ExpressionEdit problem.zip ‏36 KB

  • Vi's with sub panel

    hi
    i want to run an aplication on fp-2010 which have sub panels(panel embedding)
    but i got the following problems
    1.vi's with sub panel are not loaded on fp-2010
    2.and not supported by Lab VIEW Real Time
    can any one help me in this regard or suggest any other method that i run my application with fp-2010
    OR can i use any other tecnique which give the same functionality as sub panels and compatible Lab VIEW Real Time
    regards
    mazhar

    duplicate post

  • LR5 not showing Tone Curve "region" panel and associated sliders.

    Hi,
    The Tone Curve panel in LR5 as currently set up isn't showing the "Region" sub-panel and associated sliders.  It also isn't showing the slider immediately under the tone curve itself.  Any ideas on how to get these features to show?
    Thanks

    Hi Jao,
    Bingo!  That did the trick.  Many thanks.
    Ian

  • Events in empty sub-panels

    I have a user interface concept that I'm investigating.  The end application is to monitor the status of some parameters in equipment racks.  Since there is limited space on the screen and since there are so many racks, I thought it might work for the client to be able to click on an empty sub-panel in an array of sub-panels on the user interface and be prompted for the name of the rack that should have its information displayed there.  When the selection is made, the miniature front panel for that VI would be placed in the sub-panel.  My experiment, however, shows that there does not appear to be any events on sub-panels.  Is there any way to do this other than by using the coordinates of the mouse click in the Pane event?
    Solved!
    Go to Solution.

    These are both interesting options.  The problem with using dynamic event registration is that it requires a priori knowledge of the number of sub-panels that will be used.  This is not a problem by my original statement but I have plans to script this process later on so I will now focus my attention on how to script a new sub-panel and insert a VI into it.
    Having used JavaScript in a browser environment, there is a method called event bubbling that allows the object to handle any event enacted upon it.  If that event handler is absent, the event "bubbles" up to the next level in the DOM tree and continues to do so until a handler is found to process the event.  This is the sort of thing I was looking for in LV.
    Thanks to both of you for your comments and suggestions.

  • How to center a subvi in a sub panel control?

    Hi, al
    I want to display some subvis in a sub panel of main app. Now, I can insert subvi to sub panel.
    But they are not diplaed in the center of sub panel. I want to know whether there is a way to
    center my subvi automatically, or I have to adjust by myself.
    I also try to disable frame and scroll bars of the sub panel contro, but it don't work. please help
    me about it.
    thanks.

    I tried it and it didn't work, the vi open in the top left corner of the sub panel. Alternately, what you can do is scale the subVI front panel the same dimension as the sub panel and center what you want in your subVI.
    Ben

  • Vit's not loading in sub panel in executable

    I have turned a project into an executable. This executable acts as a server and the user interacts with it through a web browser. There is a subpanel which loads different vit's front panels depending on which button is pressed. I have solved the path issues (thanks to help from you guys). Is there an issue with sub-panels and vit's? (I have built a simpler application which loads two vit's into a subpanel alternatively and its working fine). So what might be the problem? (The executable is not outputting any errors; the application runs fine in development mode. I have used OpenG Commander to download all the libraries and vi's through it and integrated them into LabVIEW (8.2). Could it be causing some problem?

    Thanks Ben for the help!
    Yes Ben I have added all the vit's in the "Dynamic vi's and support files" section of the build properties dialog box. Yes the front panels load fine if not being loaded in the sub panel. Actually this application runs through a web server. And all the panels load and unload inside the browser. The applicatio works fine in development mode but doesn't work as expected when turned into an executable. So as a last resort I converted all vit's into seven vi's each (by appending numbers to their name) and then used a hidden control to find out which one to call. Its working now but only seven users can log onto the server at any given time. So if it could work properly somehow it would be so nice (and soothing to my aching mind which has been battling (and losin so far) the problem but to no avail).
    Thanks for the help!

  • Handling User Events in sub panel vis and main vis with same Event reference Number.

    Hi All, Iam trying to work to handle events in both subpanel vi and main vi.
    I have a main program, and 2 sub vi. I will load the sub VI in 2 sub panels in main vi. Each sub pael vi has controls on it.
    I have created 2 User events for 2 sub panels vi. One user event consits of a Cluster with 2 Booleans (x & Y) and Other User Event consists of cluster of 2 unsigned 8 Numbers (a & b). These are created and registered in the main Vi and event register refnum is passed to the subpanel vi from the main panel vi.
    I have Event structure in main panel and sub panel vis.
    In one sub panel vi, When the value of one boolean(i.e. X) in the clusters changes, the Events structure in sub panel vi should perform some operation in sub panel vi only. When the value of other boolean (i.e. Y) changes it should perform some operation in main vi. I will try to Generate user event with the x value and Y value changed based on the control clicks in the sub panel vi.
    The OTher panel vi should behave in the smae way when the a & b value changes.
    The "Generate User Event" is working fine some times and sometimes there in no event triggered in the sub panel vi or main vi.
    Please let me know what is the problem Ramesh.

    There is a lot of talking, but not much understanding.  It'd be better if you posted some example VI's of what you are trying to do so that the words will make sense.
    One thing I can tell you is that you don't want to have two event structures handle the same event reference number.  You want to have two event registrations with each one going to its own event structure.

  • How do I get the Basic and camera calibration sub panels in the develop modual to come back after they go away on there own?

    I was working on images and then when I picked a different image the basic and camera calibration sub panels disappeared. How do I get them back?

    Right click on one of the other headers and a popup will appear and you can select the ones you need to view.

  • Weird TabPanel and Sub panel's title

    Hi All,
    I have a TabPanel and having a few sub panel.
    If they are in a form without a base context, everything is fine - The panel title displayed as "Page Title"
    <Form>
    <Field name="Main Tab">
    <Display class="TabPanel"/>
    <Field name="Page Title">
    <Display class="EditForm"/>
    </Field>
    </Field>
    </Form>
    However, if the form used with a base context = "variables",
    Then I can't control what will be displayed in sub panel's title.
    It always shows "variables.Page Title", looks weird. Anyway to overwrite this title?
    code below:
    <Form baseContext="variables">
    <Field name="Main Tab">
    <Display class="TabPanel"/>
    <Field name="Page Title">
    <Display class="EditForm"/>
    </Field>
    </Field>
    </Form>

    Use this when specifying a base context:
    <Field name=":Page Title">

  • Looked up DNT:1 and reference to "Firefox Preferences" .. "Advanced panel" and "Privacy panel" yet I can't find ANY OF THESE ... Where are they please?

    I know some find this type of knowledge simple, but it's frustrating for an old non-geek like me. I tried to sign up for the mailing list about DNT:1 ... but when I clicked on "subscribe" a small window opened, telling me I had "no email program associated.." and to "create an association in the Default Programs control panel". I went to my Control Panels and Default Programs, but could not find ANYTHING in there to enable me to associate my email address TO ANYTHING. So much computer jargon ASSUMES the user knows the jargon. I'm not stupid... I have a degree and Post Grad qualifications, but I am not a mind reader even at close range - let alone online.
    Why is something important as Advanced panel, Preferences or Privacy panel nowhere to be seen on my Firefox browser page?

    * Tools > Options > Privacy > Tracking: "Tell web sites I do not want to be tracked"
    * http://blog.sidstamm.com/2011/01/opting-out-of-behavioral-ads.html
    * http://blog.sidstamm.com/2011/01/try-out-do-not-track-http-header.html
    * http://blog.mozilla.com/privacy/2011/09/08/mozilla-publishes-developer-guide-on-dnt-releases-dnt-adoption-numbers/

  • Problem with multiple sub-panels through Enum case structure: "The VI is not in a state compatible with this operation"

    Hello,
    I am using LabVIEW 8.0 and I am attempting to create a sub-panel that displays the front panel of a sub-vi depending on the selection made by the user via the Enum dropdown menu.  I have wired the Enum to a case structure and applied identical coding to each individual case structure except for obviously changing the sub-vi source.  However, I receive an error "The VI is not in a state compatible with this operation."  I was able to successfully make a single sub-vi work within a sub-panel using a true/false case structure and the exact same coding.  However, now that I am using an Enum box wired to a case structure, I receive this error.  I have attached my block diagram as well.  Could anyone assist me as to where it is that I am going wrong?
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    enum subpanels.JPG ‏22 KB

    torm wrote:
    I have attached my block diagram as well
    I only see a picture. Can you attach the VI instead? At what point do you close the reference?
    torm wrote:
    I have wired the Enum to a case structure and applied identical coding to each individual case structure except for obviously changing the sub-vi source.
    Well, if the code is identical except for the source, only the source should be inside the case, right? Why duplicate code?
    LabVIEW Champion . Do more with less code and in less time .

  • Inability to run VIs in more than one sub panel

    Hello,
    I have a VI that contains a tab control with 8 tabs. Under each tab, I have placed a sub panel. I need to a separate VI in each sub panel simultaneously.
    Using Open VI reference function and without any options,I have Invoked Nodes to Run VI and then insert respective VIs in unique sub panels.
    Apart from a single VI running under a single tab, I am unable to see any of the other VIs running in all other tabs. Error Indicator shows No Error.
    Could someone please tell me how to run multiple VIs, each in a unique sub panel, but under the same tab control?
    I failed to execute a separate VI under a sub-panel that was even placed OUTSIDE the tab control...
    Thanks in advance.

    Hello Freelance_LV,
    Thanks for your response.
    Please find the snapshots of the Front Panel and corresponding Block Diagram of the sample code I intended to use (in Labview 12).
    As you said, I too, was able to switch (insert-remove-re-insert) VIs to execute from a single sub-panel when required.
    However, in this instance, I need to run 8 different VIs in 8 sub-panels simultaneously. Its so that my customer can look at different VIs for different tab selections at any point of time, and at the same time. Sadly, only 1 sub-panel VI seems to be running while the others arent, even though the logic for opening-running-inserting VIs for all sub-panels are the same...
    Attachments:
    SubPanelTestVI - FP.jpg ‏117 KB
    SubPanelTestVI - BD.jpg ‏186 KB

  • Drag drop Sub Panel VI

    Has anyone done a drag from a tree control and dropped the data into another control on the front panel of a VI running within a Sub Panel container? I believe I will have to use a queue to actually communicate the data from the parent vi to the vi in the sub panel, but let me know if I am barking up the wrong tree.
    Chris
    Practical Physics, LLC
    www.practicalphysicsllc.com
    National Instruments Alliance Partner
    Certified LabVIEW Developer

    I dont quite get what you're referring to, while editing, or in a running vi? Or transfer data to a subpaneled vi?
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

Maybe you are looking for