Main VI Menu event calling a subVI front panel

Hi all,
I have a subVI whose front panel is loaded upon calling by a main VI.
I call the subVI using a User-menu event.
the subvi-properties are set to allow close window and i am not handling a 'panel close' event.
The problem is....
when i run the main VI and click on the menu that loads the subVI front panel, subVI window opens, and if i click on the window-close, the main VI hangs.
i understand that the control remains with the subVI only and never returned to main VI after i close subVI panel.
but is it the only way to handle the 'panel close event' or any other way out to solve this?

Try running the VI with highlight execution turned on, and see if anything unexpected is happening, or you could post your vi and let us take a nosey
Message Edited by yenknip on 09-12-2008 04:30 PM
- Cheers, Ed

Similar Messages

  • Reference to control on main front panel fails when subvi front panel is closed?

    Hi All,
    I'm experiencing an odd bug. In my code, I use a subvi to control a piece of hardware. This subvi has controls for all of the functions of my hardware.
    I'm changing the value of one of these controls from my main front panel by running a reference to a knob on my main front panel into the subvi, grabbing the value of the knob with a property node, and then updating the value of the subvi control using a signaling property node.
    This works fine when my subvi front panel is open but fails to work at all when the subvi front panel is closed.
    I'm new to labview , so any help is appreciated.
    Thanks,
    Arpan
    Solved!
    Go to Solution.

    What is your LabVIEW version?
    Front panels that are not shown are typically not updated and might not even be loaded into memory.
    The presence of certain code elements (e.g. property nodes) often forces the front panel to be in memory even if it is not shown, but I haven't studied it in a long time so there might be subtleties. Maybe somebody from NI can give more details.
    If it does not work unles the FP is open, open the front panel minimized to avoid distraction.
    Can you attach some code? Maybe there are better ways to do all this anyway.
    LabVIEW Champion . Do more with less code and in less time .

  • Load subVI front panel in subpanel

    I want to load subvi front panel in subpanel. I have attached VI , however instead of path of VI I want to provide sub vi reference.Is it possible to this?
    Attachments:
    SetSubPaneOrigin_LV861.vi ‏10 KB

    Use a Static VI Reference that can be found on the Application Control pallette.
    After dropping it, right click and browse.
    Ben
    Discalimer: In an eralier version of LV, Static refs did not work correctly in an executable.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Plotting to a number of asynchronously called subVI front panels

    Hello everyone,
    I'm working on a DAQ and monitoring program and I have a dream of doing some very flexible window management for my plot windows. Trying to make it easy to quickly open different kinds of plots and display different channels in each window. So as not to reinvent the wheel I'm trying to use Windows windows to do this by calling VIs asynchronously. The VI will be built as an EXE and used by people who don't know LabVIEW, hence trying to make it really flexible and intuitive.
    I've set up my VI like this example and it has me real close: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/acbr_call_clones/
    When I run the VI it opens whatever number of plotting windows (instances of my plotting window SubVI) I've specificed but the plots don't update. Anyone have any tips as to how to get this behavior?
    Xander Cesari
    Automotive/Internal Combustion Test Engineer
    CLAD certified, mainly focused on data acquisition
    Been LabVIEWing for a few years, still a lot to learn
    Solved!
    Go to Solution.

    Bob,
    Thanks for the reply. I'm using a QSM-PC architecture, here's the relevant loop. Looks pretty much identical to the linked example, I hit that point and I decided I needed a bit of help wrapping my head around it. Data's coming in on a queue (the snippet broke the reference). My idea was to pop open all the windows in this state then use another state to plot data to them.
    In 'synchronous' mode I was able to get the desired behavior out of my subVI but it was also set right in a while loop and by playing with the Call Setup a bit I got it to do what I needed (open a new front panel and constantly plot).
    The queue idea is very promising though! I should be able to generate queues right in the For Loop that calls my VIs synchronously then enqueue in a "RUN" state. I'll give that a try.
    Xander Cesari
    Automotive/Internal Combustion Test Engineer
    CLAD certified, mainly focused on data acquisition
    Been LabVIEWing for a few years, still a lot to learn

  • Problem about asynchronous call: subVI front panel doesn't pop up when called.

    Dear All,
    I'm new to LabVIEW, and this is the first time I try to use the asynchronous call.
    I'm using LabVIEW 2011.
    I want to build a directory for several VIs, and it should allow users to open more than one of the VIs at the same time by pushing the buttons. Before building this directory, I simply tried to use asynchronous call to call a VI form another VI, but found a big problem.
    I followed the steps in the help file, created a strictly typed reference, set the option to x80 because I don't need the return. When I run it for the first time, it worked fine: the subVI popped up and run. Then I closed the subVI. But for the sencond time and on, when I run the caller VI, the subVI didn't pop up, instead it seemed to run silently on background because when I manually opened it from the file I found it running. Besides, I didn't find any option like "show front panel when called" of the asynchronous call.
    The caller VI and subVI are attached. The address of subVI in caller VI should be changed accordingly.
    What should I do to make it work properly? Thanks very much for  any idea!
    Solved!
    Go to Solution.
    Attachments:
    asynchronous_call.vi ‏8 KB
    boolean.vi ‏7 KB

    Jeff·Þ·Bohrer wrote:
    A better approach is to set the vi properties programaticly like this:
    Jeff, you will be happy to know that I used this tactic in full force on a project recently (lots of dialogs in this program).  Not sure how many LabVIEW reboots it has saved me from.  Reuse VIs made it even easier to do.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Using a "menu ring" feature on the front panel with event structures

    hello - right now i have many event cases controlled by many "ok buttons". i would like to use a menu ring on the front panel to save space from all those buttons, but i don't see how it will work with all the individual event cases. currently each event is tied to a single button, and the menu ring acts as one thing on the block diagram so i can't tie an event to a choice in the menu. any suggestions? thanks....

    Alternativley, you could use an enum control instead of a menu ring. It will name the cases according to the selection automatically.
    If you want to use a menu ring and strings, you could do something like in this image.
    Message Edited by altenbach on 02-09-2006 01:43 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RingText.png ‏3 KB

  • How to call a VI front panel using Menu on anothe VI

    I want to create a VI Which will have menu to call another VI frontpanel at the run time is it possible to call another VI frontpanel using the LAbVIEW version 7.0 please mail me at [email protected]

    Shoyeb,
    Yes this is possible.   First, you will have to implement the Run time menu.  Then, use the Events structure to detect when a user has selected a menu option.  Finally, when this Event triggers, you execute the other VI. 
    Let me know if you have any questions.  I can attach an example if you run into issues. 
    -Khalid

  • Question about subvi front panel

    I want to call a subvi in the main program and do like
    this:
    1. When the main program calls the subvi, the subvi shows its front
    panel and executes.
    2. After the subvi finishes, it can close the front panel.
    Now, I meet a problem: I can popup the subvi node setup dialog to enable
    "show front panel when called", which implements the first one, but I
    can not close the front panel until originally closed(main
    program stops). How can I close the subvi's front panel(after it
    finishes running) even when the main program is still running?
    Thanks in advances.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    In article <[email protected]>,
    "Remco Breen" wrote:
    >
    > [email protected] wrote in message <[email protected]>...
    > >In article <[email protected]>,
    > >"Kevin B. Kent" wrote:
    > >> [email protected] wrote:
    > >>
    > >> > Now, I meet a problem: I can popup the subvi node setup dialog to
    > >enable
    > >> > "show front panel when called", which implements the first one,
    but
    > >I
    > >> > can not close the front panel until originally closed(main
    > >> > program stops). How can I close the subvi's front panel(after it
    > >> > finishes running) even when the main program is still running?
    > >
    > >
    > >
    > >
    > >> Select the "close front panel if originally closed" option.
    > >> in addition to the "Show front panel when called"
    > >>
    > >> Kevin Kent
    > >
    > >
    > >I have tried this, in this way, the subvi's front panel is closed
    only
    > >after the main program stops. In fact, what I want is to close the
    > >subvi's front panel even the main program is still running.
    > >
    > >
    > >zhljh
    > >
    > >
    > >Sent via Deja.com http://www.deja.com/
    > >Before you buy.
    >
    > Another option would be to open a VI reference (found under
    "application
    > control") and tie that to a property node and select the property
    "front
    > panel.open". Change it to a control and attach a boolean false to it
    when
    > you like to close.
    >
    > RB.
    >
    I think a more elegant way of closing the SUB VI is to start off the way
    that Remco states regarding opening a VI reference. Only in the Sub VI,
    you should program a Terminate control (such as an Abort button to exit
    from a While loop... or something similar) and via the VI reference,
    select the 'Set Control Value' method to gracefully stop the Sub VI
    execution. Of course the Sub VI will have to set the close if originally
    closed attrib set.
    There is a great source of example LabVIEW apps at:
    http://digital.ni.com/explprog.nsf/web%2Fswgrp?OpenView&Start=1&Count=50
    0&Expand=3.7#3.7
    In particular, see "Stopping a Running SubVI from the Main VI Using VI
    Server" example. It demostrates this techniques better than I can
    explain it. Hope this help.
    Rick
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • While loop with stop button within event structure locks up front panel.

    I am not sure if this is a bug with my program or a bug within LabVIEW.  If you believe that this is a bug with my program then I will post my program to be looked at.
    The problem I am having is there is a while loop within an event structure that fires when a particular value changes.  Once the "Activate" button is pressed the while loop within the event structure starts going with a polling frequency of 1hz (1000ms wired to the "wait till next ms multiple" vi).  There is a "Deactivate" button that is wired to the stop control of the while loop and an outter while loop that resets the event structure so that the activate button is being listened to again.
    Once inside the while loop, however, none of the button are responsive within the front panel.  The VI continues to run, and only 60% of my CPU is being consumed, but none of the button or scroll bars work.  The only way for me to terminate the program is with the "Abort" button next to the "Run" button.  If I remove the event structure so that the while loop in question runs as soon as the program starts, the front panel remains responsive.  I've inserted probes within the while loop and verified that it is not running prior to the "Activate" button being asserted, and it is running after the assertion of the "Activate" button with the expected polling frequency set by the "wait till next ms multiple" vi.
    Can anyone help?  Do I need to post my code?
    -Nic

    It is typically not a good idea to stall an event structure by placing loops inside event cases. What good is an event structure if it is not free to repond to events?
    Have a look at some alternative solutions, such as in the following link:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=224817#M224817
    LabVIEW Champion . Do more with less code and in less time .

  • Simple example - Break FOR loop inside an event structure based on Front panel event change.

    I am running a for loop inside a state machine architecture that contains a FOR loop. How can I break this For loop based on Event change in front panel ??
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.vi ‏19 KB
    Case inside Event.ctl ‏6 KB
    Case inside Event 2.ctl ‏6 KB

    Okay. Accpeting that the design is not favorable and not advantageous when my program expands. I have begin to follow producer/consumer programming architecture.
    Please find the attached program which is a simple producer consumer with event structure. I wonder how could I stop looping around the producer and consumer loops over and over again. I am pretty sure that this ENQUEUE ELEMENT loops back to the consumer loop and starts from begining.
    I hope my first program in PC architecture with State machine and Event structure is correct. 
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.3-ProducerConsumer Event.vi ‏25 KB
    Case inside Event.ctl ‏6 KB

  • Imitate boolean switch behavior using an event structure on a front panel indicator

    Hi,
    I am looking for a possibility to imitate the bevhavior of a boolean switch with an event structure. To be more precise, I want a boolean value to change each time I click on the front panel indicator and then remain constant until I click again. I have not worked with shift registers in a while loop yet, but could this be a way to find a solution?

    LordSnow wrote:
    Okay, I figured it out, BUT I still have a problem. Before I first trigger a mouse event on the front panel indicator, I already need the case structure to be executed once. Therefore I assume that I need some kind of default value, but since the event structure does not create any output at first, I have no idea how to do that.
    Are you talking about the shift register you just created?  You can while in a default value on the left shift register ndoe.  It is wired outside of the loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • 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. 

  • Menu bar / Toolbar hidden in Front Panel?

    Hello all,
    I am a newbe with Labview. I have to adopt a Labview program from a
    person who is not available anymore.
    He has programmed a start.vi which calles other sub-vi_s. While the
    program is running, the menu bar and the tool bar is vanished. How did
    he do that and how can I make the Labview menu bar and the tool bar
    visible again? I would like to have an abort button, among others.
    Also, the program just executes after being loaded. I want the program
    to load, but not to run immediately.
    I use an old version: V4.01
    Any help would be appreciated.
    Johannes

    I would also like to add that having the abort button not available is a really good idea for the program when you want it to be used as opposed to development. Depending on what's going on, aborting a VI can have some real nasty consequences.
    As to your other question, the VI's properties may also be set to run when opened. You should see that option on the Execution page. You may also have to enclose the existing code inside of a case statement and then put all of that inside of a while loop. With a while loop, the program will continously read the status of a start button. When the start button is true, then whatever is inside the true case will execute. This is where the old code should be. When the old code is done, you can then press the s
    tart button again to repeat. You will also need to add a stop button wired to the while loop terminator.

  • Exporting front panel of subVI to calling VI

    Is there a way to "export" the front panel of a subVI so that it becomes part of the (or a pane of) the calling VI? If so, what is it called? I don't know the right language to search for examples of this concept.
    My problem is as follows:--
    I built a nice, classy interface to a test program that allows the user a great deal of flexibility in controlling the parameters of the device under test and in seeing the impact of those parameters on other parameters. This has about 8-12 control objects, some of which are also wired to act as indicators so that changing one can display on another and vice versa. This interface and its supporting program is big enough that it belongs in its own subVI rather than in the main program. In addition, I built another interface that charts signals from the device under test; this is also big enough that it belongs in its own subVI.
    I would like to have the front panels of both of these VIs be part of the front panel of the main program. That is, the front panel of the main program should "inherit" the front panel of each subVI wholesale. If I need to tweak the interface of one of the subVIs -- for example, to add, delete, or replace controls, indicators, displays, charts, etc. -- I would like to be able to do this without having to wrestle with the main VI and the connector pane between it and the subVI.
    It seems that LabView should be capable of this, but I cannot find any help, guidance, pointers, etc., in the documentation, textbooks, or examples.
    Could someone give me a clue?
    Thanks,
    Hugh Lauer

    So I tried to configure a subpanel, and found it very confusing. It seems that when you put a subpanel control on the front panel, you have to then set up a way to invoke the subVI. Since my subVI has some inputs and outputs on its connector pane, I created a VI reference for it and wired that to the type specifier node of the Open VI Reference node. I then inserted a Call VI by Reference node, so that I could wire up the inputs and outputs of my subVI. Finally, I wired this to the subpanel Invoke Method (Insert VI).
    This is different from the examples I found. In those cases, the subVIs had no inputs or outputs on their connector panes, but rather took all of their information from their front panels.
    I got different behavior on different attempts to run it. The most common (and most recent) behavior is that the subVI front panel opens up a few seconds after the main VI starts, but it is not quite "in" the subpanel. Instead, it is offset about an inch from both the top and left, as if it were a floating window that I cannot move. Also, it has annoying scroll bars on the bottom and right, which I don't want.
    Incidentally, I have two of these subVIs, and I have not yet tried to put the second one into a subpanel.
    What I would really like to do is
    have both subVIs populate their respective subpanels as soon as the main VI starts, but before any work gets done.
    after both subpanels are loaded, run the two subVIs in parallel, one to control the device under test and the other to capture its signals.
    have no scrollbars in the subpanel windows.
    In fact, what would be the best from a GUI point of view is for the two subpanels to be permanently part of the front panel of the main VI.
    Any guidance or insight would be most helpful.
    REgards,
    Hugh

  • Front panel of SubVI locks on 2nd call

    HI!
    I'm calling a SubVI and pass a Boolean Reference to this SubVI. In the SubVI I'm executing a While loop. The stop condition is the value of the boolean control in the VI that calls the SubVI. (Boolean Refnum + Property Node: VALUE connected to while stop condition)
    Mechanical Action of the Boolean in the calling VI is: Switch when pressed.
    For the first time this will be executed it works fine. But the 2nd time the SubVI is called. The Front Panel of the calling VI where the stop button is located will be locked.
    Does anybody have an idea why this happens and how I can solve that problem?
    ANDY

    I tried what you described, using LV 7.1, and I have no problems running the vi over and over again. See the attached examples. Ref1.vi calls Ref2.vi and passes the Boolean reference to it.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Ref.zip ‏21 KB

Maybe you are looking for

  • Crw32.exe has encountered a problem and needs to close,pls help

    When I try to use a crystal report version 10.0 to querry from two data source at same time, I got following error: Crw32.exe has encountered a problem and needs to close. We are sorry for the inconvenience . I have a 8.5 version crystal report and i

  • Oracle8i Release 3 Provider for OLE DB Version 8.1.7.3.0 zip file corrupt

    Hi, I'm trying to download the file http://download.oracle.com/otn/other/ole-oo4o/OraOLEDB_81730.zip After it finishes the 42mb file I open it with WinZip and get the following error WinZip Cannot open file: it does not appear to be a valid archive.

  • I am unabel to select all rows in advance table using Select All option

    Hi all , I am unable to select all the rows in advance table . Select All option in advance table selects all rows present in working page but doesnt select the rows which we get by clicking next button ... i am having a requirement to select all the

  • Record Type Constructors in Packages

    I am having trouble getting past this error. Here is an example of my code: create or replace PACKAGE MyPackage AS   TYPE MyPerson IS RECORD ( "NAME"  VARCHAR2(255 CHAR) );   FUNCTION GetPerson RETURN MyPerson; END MyPackage; create or replace PACKAG

  • How to import .MXF files in to FCP?

    Greetings I got me some .mxf files on an external drive given to me by someone. They should contain 720p and 1080 video files but instead I was given .mxf files What the heck are these things, and how do I get them in FCP? I can't import them as FCP