Programaticly (dynamicly) show front panel of a vi

I want to programaticly show the front panel of one of my sub VI's. I have one method that allows me to do this but I would like others input on wether this is a proper way or if there is a better method. I want to make sure that I am not going to gobble up memory.
The VI properties are set with the show panel on all unchecked.
The reason for doing this is because sometimes I want user input and other times input is provided dynamicly.
Attachments:
DynamicShow.vi ‏36 KB

Your code looks pretty good. The only thing to be careful of is reference numbers and loop. With a WHILE loop (like you are using in tis example) there would be no problem simply running the reference through the array.
However, if you every want to do something similar using a FOR loop you will need to be very careful because they have a fundamental difference. WHILE loops always execute at least once, so their outputs are always defined. FOR loops can execute zero times, and when they do their outputs are undefined--which in the case of a reference results in an invalid reference and lots of errors down stream from the loop.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Show front panels of sub VIs when running a EXE (build application)

    I've created a exe file and it works fine. However, it only shows the front panel of main VI and I can not open sub VIs (it looks like they are all hidden). I know it can be done by creating a library file along with this exe file, but that's not what I want. I want to create a single exe file that shows several front panels, and that can be run with run time engine. Is there any way to show front panels of sub VIs by running a exe file?

    In the development mode, how are you displaying the front panels? Did you right click on the subVI and select SubVI Node Setup and choose 'Show Font Panel when called/Close afterwards if originallly closed' or did you choose the same options from VI Properties for each subVI. If the second, then the app builder will automatically retain the front panels of the subVI. If you chose the first option or if you are using VI Server to open a front panel, then the default setting in the app builder is to remove the front panels. You would then have to go the VI Setting tab in app builder and edit the settings.

  • Show front panel in runtime

    I want to show front panel in runtime( or when called) without all the
    menus, tool bars and scroll bar, just as a ordinary control panel only
    with window title.
    any suggest will be appreciated.
    Jacob
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    [email protected] wrote:
    > I want to show front panel in runtime( or when called) without all the
    > menus, tool bars and scroll bar, just as a ordinary control panel only
    > with window title.
    >
    > any suggest will be appreciated.
    >
    > Jacob
    >
    > Sent via Deja.com http://www.deja.com/
    > Share what you know. Learn what you don't.
    These are options you can setup using the Sub-VI Setup.
    You can also access these through the VI Server.
    If you look on NI's web site and get the Splash Screen VI
    you can see how to do this.
    I can't get to LAbview right now or I would be more specific.

  • Show front panel of subVI on a real-time target

    Hi,
    I'm running an application on a real-time target (14.00). On the main front panel of the application, I have a button who open another VI with the invoke node method but this component doesn't work with Real-Time taget. So, how can I show the front panel without this method ?
    Thank you

    Hint: RT = there should be no GUI.
    RT applications are meant to just run off on their own.  GUI is not part of a real RT system since that adds a non-deterministic process to the system, adding jitter (which is a big no-no in RT).  What you should be doing is making a Windows host application that can communicate with the RT system (via Network Streams, TCP/IP, etc).  The host application acts as the GUI/HMI.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Show Front Panel form VGA output of CVS

    I have built a stand-alone Real-Time Application on my CVS by following the method in ‘RT_Getting_Started.pdf’ file, and I think it is successful (because the ‘startup.rtexe’ file is already created in the startup folder in CVS). I was set the application file as a startup.
    Is it possible to show a Front Panel of Real-Time Application (Startup program) from a VGA output of CVS without using any PC?  I want to use only CVS and Monitor (from VGA output).

    hello MFarid,
    Thank you for your post.
    It is only possible to show some images and counters on the VGA output of an CVS. You will need a graphical operating system (like windows) to present the complete front panel of your VI. There are complete panel PC's (like PPC 2015 and PPC 2115) which are complete PC's with a touch screen.
    If you want to make a simple user interface (only some buttons to control the CSV and some simple data presenting) a touch panel (Windows CE device) can be used. Please be aware that you need a Labview touch panel module to deploy to this kind of device. The simple user interface can communicate throug shared variables with your Labview application on the CVI.
    So I'm sorry to say that with only a monitor and a CVS it isn't possible.
    Many greetings,
    Martijn
    Martijn S
    Applications Engineer
    NI Netherlands

  • Problem : controls & indicators not updated when programati​cally open Front Panel

    Hi,
    I have a strange problem when I want to progamatically open the front panel of a sub-vi: for some sub-vis the controls and indicatores are correctly updated while for others they are not (ie the controls show outdated values).
    I have created an example here that illustrate this. The 2 sub-vis are *exactly* the same, but only one shows updated controls when I open it (with the sub-vi previously closed of course).
    How is that possible?
    What do I have to do to have the controls updated to the last value of the *last call* when I open the sub-vi?
    Solved!
    Go to Solution.
    Attachments:
    Front panel problem.zip ‏35 KB

    titi_nicolas wrote:
    mhmmm,....no that is NOT the reason... Have you tried the VI???
    Honnestly, I would not bother people on this forum for such a stupid mistake.
    And I also expect people to know how to run a VI....
    And to play in your game, you forgot -3) Turn on the PC, -2) log in windows, -1) open labview...
    Well, I DID run your VI and everything worked just fine, however I no longer have LabVIEW 7.1 so maybe your observation no longer applies to newer versions. It could also be because they were just upgraded as Ben noted. I did not study it in detail.
    And Yes, as Ben noted, invisible VIs don't get updated for performance reasons (and not to waste extra data copies for the controls and indicators). LabVIEW is typically smart enought to update when needed, e.g. if the subVI tries to print its panel, etc.
    I guess you haven't been in this forum for too long, but since controls can easily be operated in edit mode is is absolutely important to mention at which step you run the VI. (try to operate your controls with the computer turned off and you will see that it is not that easy ). Also if you have been programming for any length of time, you should know that stupid mistakes happen all the time (at least to me and Ben ). It is much easier to weed out the stupid mistakes with a quick question&answer than to spend hours searching for a deep and complex solution.
    LabVIEW Champion . Do more with less code and in less time .

  • Dynamically opened front panel won't work in executable

    I am dynamically opening the front panel of a VI from the top level VI. After I build an executable, this does not work anymore.
    Any ideas?
    Scientia est potentia!

    See the marked solutions in these threads.
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=402041
    http://forums.ni.com/ni/board/message?board.id=170&message.id=400907&query.id=212194#M400907
    Message Edited by elset191 on 07-23-2009 03:38 PM
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect

  • Button Function Problem When Showing Front Panel of Sub VI

    Good Afternoon,
    I have a created a simplified version of a much more complicated vi to illustrate the problem I am having. Attached is a main vi and a sub vi. The main vi has a boolean which says to open or close the front panel of the sub-vi. This works great. However, the other push button ( " My Button Function" ) on the main vi does not work properly when the sub-vi front panel is being displayed. It is supposed to be a  "switch until released" button. However, if you try to click and hold it down while the sub-vi panel is displayed it acts as if I am clicking the button rather than being able to hold it down? I was wondering why showing the sub-vi front panel makes this happen? And also, if anyone has any recommendations to fixing this problem?
    Attachments:
    main.vi ‏12 KB
    sub.vi ‏5 KB

    What is happening is the loop is running very fast.  It is constantly reading the open SubVI button and opening the subVI if true, even if the subVI front panel is already open.  If you are trying to hold down the other button, the opening of the subVI front panel is taking away the focus from the main VI and thus acting like you let up on the button.
    Maintain the status of the subVI in a shift register and only open or close it if the status changes.  See attached Main VI.
    Attachments:
    main.vi ‏12 KB

  • How to programati​cally set front panel objects (buttons) to enable, disabled, and disabled and gray

    I'm writing a program that when I am iterating through a loop, I want to have some buttons disabled and grayed. Once the loop is done, I want those buttons to now be enabled.
    But I have no clue how to programatically do this
    (aka enable and disable while the program is running, NOT before the program starts)
    Any help would be appreciated

    Create a property node, & select the 'Disabled' property.  Set it to 0 for enabled, 1 for disabled, & 2 for disabled & grayed.
    Paul Cardinale

  • How to show the front panel when launching VI with Call by reference node??

    Hello!
    I just wonder how I make the front panel visible during execution when I launch the VI with CALL BY REFERENCE NODE.
    Se example.
    Could u also show me how to change different properties (window size ..) of the front panel??? (launched with CALL BY REFERENCE NODE)
    Thank you!
    Attachments:
    test.vi ‏18 KB

    In VI Properties>>Window Apperance>>Customize you can check "Show front panel when called". This will open the front panel on each call. It doesn't matter how the call was initiated.
    You can set a lot of Front panel properties during runtime. Place a Property Node in the block diagram. Change the class from App to VI. Under properties select Front Panel window>>Panel bounds to set the position and size of the front panel.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Front Panel of select VI's pop up upon start-up

    I have a main VI which organizes about 200 test cases(also VI's). However when I load the Main VI, about 50-60 of the front panels from different VI's load. I've checked most of the settings and can't figure this it out. Is there anything I'm missing. Someone suggested a VI Server...what's that? Is the only way to have the front panel load one at a time, to make the VI's load dynamically?

    Let me see if I understand your problem correctly. Are you saying that when you load your main VI, but before you run it, the subVI's front panels are displayed? If that's the case, there's a couple of ways that this could be happening. First, in the VI that has the subVI, right click on the subVI and select SubVI Node Setup. Make sure that Open Front Panel When Loaded is not checked. Second, open the subVI itself and go to VI Properties>Window Appearance. If the Custom radio button is selected, click on the Customize button and see if Show Front Panel When Loaded is checked.

  • VI front panel won't close when it's done executing, when this vi was called by reference.

    I've created a simple vi set to demonstrate the issue I'm having. I'm dynamically launching sub vi's from a main application. Simply put the main application is my test exec and the subvi's I'm calling dynamically are different tests. In the example I'm posting here the test vi is called Electrical Test 1.vi. I've configured this Electrical Test 1.vi to show front panel when called and close afterwards if originally closed.  Problem is it won't close the front.
    Other things to keep in mind
    I want to be able to launch the test vi and not wait till it's done.
    I'm using LabVIEW 2012 SP1.
    Solved!
    Go to Solution.
    Attachments:
    vi_launcher - v5.zip ‏73 KB

    Basically the close after call only matters if the VI is called as a subVI (just like if you open a VI yourself and run it, it doesn't close when it is done).  The two ways around this are to either have your top lvl app close the VI when it is done, this is explained here:
    http://digital.ni.com/public.nsf/allkb/987B2026B41BD39786256CF800032E8C
    or to have your VI close itself when it is done.  Use a This VI reference and the Front Panel:Close invoke node.
    Hope this helps.

  • Front Panel bounds on secondary monitor

    Hello!
    I would like to display some elements of the front panel on the primary and others on a secondary monitor. So I decided to make a subvi from the elements I wanted to show on the secondary display.
    It nearly works, but I would like to have fullscreen on both of the monitors. Unfortunately if I change front panel bounds to be written in the attached subvi, it shows up on the primary monitor. If I leave front panel bounds to be read it works with the secondary monitor.
    Could you give me some advices how to solve the problem?
    Thanks!
    Attachments:
    subvi.vi ‏15 KB

    Dear VampireEmpire,
    One way you can do it is to create 2 SubVIs (each with the specific indicators etc, then set the Window Appearence of those VIs Custom, and check "Show Front panel when called"
    If you are in a VI, press Ctrl+I, or right click on the icon of the VI on the front panels upper right corner, get VI Properties and navigate to Window Appearence.
    In each of these VIs use the Invoke Node : 
    VI Server Reference (This VI), --> Invoke Node --> Front Panel --> Run-Time Position --> Maximized, and wire monitor number 1 to the primary and 2 for the secondary. Use for example a while loop, and if you want to terminate only one of the VIs at Run-Time, remember to Close the Front Panel (Invoke Node), and the reference.
    Then create a 3rd, VI, call it a wrapper, and insert the two VIs to be called. When you run this wrapper, you programatically call the other two VIs front panels.
    I have created a little example how to do it. Please find the attachment and tell me your experiences. 
    A more sophisticated way to do it would be to programatically open the references from the main.vi, and Open --> Run Time.maximize in a while loop --> Close the front panel in the caller.
    https://decibel.ni.com/content/docs/DOC-29472
    Best regards,
    Peter L.
    National Instruments Hungary
    Applications Engineer
    Attachments:
    MONITOR.zip ‏18 KB

  • 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

  • How can i open front panel of a vi and run it

    Hi
    I have a vi that i call multiple times from another vi, however i want it to open the front panel on some calls and not on others.  What is the best way to do this?
    I have come up with a way and was wondering if this method was okay or is there another method that might work better escepcially since i am eventually going to create an application out of it and hope that no problems pop up then
    Unititled 1 calls Untitled 2 where with one call it opens and runs Untitled 2 while with the other call it simply runs untitled 2.vi
    What I did was i changed untitled 2.vi window appearance to dialog but i deselected the show front panel when called, so by simply calling the subvi form untitled 1 it works.  Unititled 2 runs but does not open
    Now with another call i want to open and run untitled 2.vi so by looking the attached vi you can see what i have done
    Again if there is a better method that would make my vi's more efficient i would greatly appreciate it.
    Reza Sed
    Attachments:
    Untitled 1.vi ‏24 KB
    Untitled 2.vi ‏10 KB

    What you did, in theory, is the correct way to do it.  However, you should move the front panel open and close into Untitled2.vi and have a boolean input as to whether to show the front panel or not.  This way, your calling code is cleaner, and you don't have to reproduce the code everytime you want to call the subVI and show the panel.
    If you were to use Untitled2 in another project, then you woud have to go back and look how to implement the showing of the front panel in your other code.  If later, you were to decide you want that VI to be maximized, then you make one change in the VI, and not in every place you ever call it showing the front panel.

Maybe you are looking for

  • Move a file from one lacation to another in FTP

    Hi Experts, i have scenario were i have to move a file from one location to another in a FTP the source and the Target  structure are same can we go  with only configuration(ID) why because there is no mapping done but i have dbout when we create a s

  • How to Use Remote Printer's FAX and Scanner on Win 7

    HP LaserJet 3050 hosted by an XP computer. I've been able to install it for printing from a Win 7 machine but I can't find a way to install its fax or scanner functions. I tried using the printer driver to print to the fax and it corrupted the XP's s

  • Boot camp stuck partitioning

    I am having quite a panic attack here. I wanted to partition my 2tb hard drive in the second bay to have windows on it. I obviously did this using boot camp. I followed the steps as I had done it before and ended up partitioning 101gb for Windows. Th

  • Help Needed on report Urgent

    Hi Experts my requirement is to combine the standard selection screens of T-CODE IW39 & IW59 as a one selection screen. i tried  a lot but i'm unable to do it. in these selection screens some blocks are called by dynamically through ldb. if i copied

  • ECM with Digital Signature

    Hi PP Gurus, Can anybody guide me about how to configure Digital Signature for ECR - ECO? I need to give R/3 UserID and Password for each step of ECR - ECO like for checking ECR - Engg Head Approving ECR - Quality Head Converting ECR - Production Hea