Multiple subvi's in main front panel

Hello and welcome (it is my first post here),
sorry if such subject was already risen, however I don't know how to specify it exactly in terms of LV nomenclature (I'm a beginner in LV) what makes it quite difficult to search the forum.
I need to create an interface with user specified number of input channels (specified during application work, so dynamic loading is necessary). Each channel is to be controlled by subVI. I'd like to load panels of all running input subVI's into some container in a main front panel (similarly to subpanel, but loading multiple VI, not single one). Is there a container capable of this? Is it at all possible in LV?
Regards,
kaolpr
Solved!
Go to Solution.

You can use multiple subpanels. Unfortunately the number of subpanels must be set during development. You could create a method of cycling through your various channels. This would involve loading and unloading the multiple subpanels that you do include in the UI.
Another alternative would be to use a table or something similar. Have your subVIs post updates to the UI code via queues, notifiers or user events. Tables are much easier to manage when your number of elements varies. If you need to have the UI pass information to the subVIs it can also use queues, notifiers or user events.
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

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 .

  • How to update the variables in sub-vi on main front panel?

    hi~
    The problem is to display variables in Sub vi on main front panel.
    What should I do?메시지가 04-07-2005 03:14 AM에 julitan에 의해 편집되었음
    Attachments:
    main_.vi ‏14 KB

    You probably want the slide to update while the while loop in the subVI is running, so you can't simply wire an output from the subVI to the main VI. So you are going to have to use some form of communication between the two VI's other than a hard wire. For this simple case I think I would recommend using a global variable. You could also use DataSocket or even write the value to disk, but using a global is probably the easiest method for this case. I've attached your modified VI's. Let me know if this works for you.
    Robert Mortensen
    Software Engineer
    National Instruments
    Attachments:
    global.zip ‏45 KB

  • How to show in the main front panel the progress of each sub Vi ?

    my program has many sub VIs, i wish to show in the main front panel the progress of each sub Vi; what is the best way to do that?
    atleast i need to show that each sub vi is completed, [can i add details on the main front panelsuch as: filename that is being read by a subVi, graphs plotted by a subVi, etc..]
    can i display a graph from a subVi on the front panel of the main Vi?
    what i hv done is attched as picture.
    Solved!
    Go to Solution.
    Attachments:
    Capture4.JPG ‏152 KB

    as suggested...pass references and cntrl references
    Spoiler (Highlight to read)
    Attachments:
    main ref cntrl.zip ‏27 KB

  • Multiple SubVI display onto main VI

    Hi everyone,
    Probably a really simple solution to this problem:
    I have 6 SubVI's that I want to use on one main VI, no problem, but I would like to display all 6 SubVI front panel display onto this one main VI. Hope this makes sense!
    I looked at SubPanels and tried to add more VI's to it but it only displayed a single one.
    Any help would be great
    Thanks

    Hi Intel;
    My application had similar GUI requirements, but unfortunately, there is only so much GUI space!  Here are a couple of options that you can use:
    (1) Break up the GUI using splitter bars (if you are using LabVIEW 8.0 or later) and place several subpanels, or forget the splitter bar and simply place several subpanels on the same GUI; or...
    (2) Use a TAB structure, and place a different subpanel in each tab (i.e. if you have 6 subpanels, then use 6 tabs each containing a subpanel); or...
    (3) You can use a single subpanel, and depending on which sub-vi is required to be active, you can write some code to "unload" the existing sub-VI and then "load" the new one.  This is the only way (I am aware of) to have a single subpanel reference multiple VIs.
    Hope this gives you some ideas.  I make use of all three methods in a single program, for example.
    DJH

  • Multiple VI on a Single Front Panel

    Probably a simple question but I'm having trouble figuring out how to do it.
    First, I have LabView 2010, Professional Development System
    I have been trying to learn LabView the hard way.  I've been reading the documentation, starting with Getting Started and testing VI and front panels for instruments we have in the lab.  I can run the examples and control the instruments individually through individual front panels.
    My question is, "How do I create a single front panel (or application), that consists of several instruments?"
    For instance, I have an Agilent 34970, Data Actuisition Unit.  And I can create a front panel (and block diagram) to read data from the instrument input terminals, operate switches, etc.  I also have a GenSys Power Supply and can control the voltage levels and on/off, from it's front panel. But the two panels (and block diagrams) are not linked.
    I have other instruments but understanding how to link two different block diagrams (with single front panel), will help me figure out how to expand it to multiple.
    How do I integrate multiple block diagrams (or VI), with a single front panel (and block diagram) such that I can use loops, structures and conditions in one, that can be used to control the programming in the other.  For instance, say I want to sample an input on the 34970 and if it's between x and y voltage, then set the power supply to another voltage and test again. This requires two VI acting in synchronization with each other. 
    I can do each seperately but am stuck on how to integrate these into a single application.
    Thanks,

    Hi Mike,
    Patricia B is right... You can try sub vi. But if you really want to put two vi's in a same window you can try sub panel. But it is not recommanded... Check these vis....
    <<Kudos are welcome>>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16
    Attachments:
    Try this.7z ‏26 KB

  • How can I hide the main front panel when I run from the executable?

    Hopefully this is an easy question. I have an application where the front panel is not the main GUI and I would like to hide it when the program runs, but only when it runs from the executable. How can I do this?

    NIquist wrote:
    Yeah, don't do that. Executables built in LV require at least one front panel to be open. If it isn't, the run-time engine automatically closes the executable. I haven't checked recently, but I assume this is still the case.
    Instead, you can set the FP state to minimized (as suggested earlier) or (better) to hidden.
    P.S. one side point - the property and invoke nodes have a shortcut - if you use the Application or VI classes and don't connect a reference, they default to the current app or VI. That means you don't have to open the reference.
    Try to take over the world!

  • Urgent How to fulfill multiple lines input in CVI front panel?

    Hi Guys,
    I want to paste multiple lines text from other files to CVI front panel, but String, Text Box or List Box can't do when I tried.
    Could some one tell me how I can realize it or show me an example?
    Thanks in advance!

    You can add this functionality by using RunPopupMenu to display your own menu when right-clicking on the control: see this discussion and the example attached to this post.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Different pages of main front panel

    How can i create different pages of the front panel? A link is give in which the frontpanel has number of pages.
    https://decibel.ni.com/content/docs/DOC-15943
    Solved!
    Go to Solution.

    Hello Sadan,
    Use Tab Control for that.
    Regards,
    Bijay

  • Main Front Panel Cluster reference in Sub VI

    If I create a reference to a cluster and then create a Sub Vi,  I can change
    the cluster variables from the sub vi. All works well - Until I modify the Cluster.
    This breaks the sub vi with a wire class error. Can I fix this ???
    Solved!
    Go to Solution.

    Hi Ben,
    You got a broken wire just because you used a property node for strict type definitions (not for generic). The VALUE of the property node that you used includes the information of cluster data type.
    My suggestion is to use a type def cluster, and use this cluster constant for "Variant to Data" in subVI. By using this type def cluster, you do not need to modify the main part of your subVI. You only need to change the unbundle item when you add/remove new element of the cluster.
    Attachments:
    LV Ref.zip ‏18 KB

  • Opening multiple sub VIs (front panels) in an application

    Hi, 
    I am working on a small process control application. The main VI represents a layout of various equipment (pumps, valves, heat exchangers). Each TYPE of equipment
    can be turned on/off through a particular subVI. The subVI is displayed when the operator clicks on the component.  At the moment only one subVI front panel can be loaded. I would like to have multiple panels open at the same time; this to include multiple instances of a same VI and different subVIs.
    I have tried to set properties in the WindowsApperance dialog box but cannot acheive the desired operation. 
    Any suggestions?
    Thanks

    Trust my personal experience: You do NOT want multiple dialog windows open.  The users will hate you and curse your name if you do.  You really want to use subpanels and limit what the user can do.  Subpanels are a way of inserting a VI's front panel into another VI's front panel.  So you want to have a section of your main front panel that the user can load whatever control subVI they need.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • It is possible to open the front panel of a subVI more then one time at the same moment?

    I want to open a subvi´s front panel several times with each one operating independently. The subvi has a ring with several variables to choose to show in a graphic. The subvi is called from a button on the Main Front Panel. It is possible to, for instance, open the subvi and set it to show a temperature graphic and click again on the button to call another instance of the same subvi and select pressure for the graphic, keeping both new windows side by side? Will I still be able to access the Main Front Panel?

    Yes you can. You have to use a .vit (VI template file). There's an example here. There's also been lot's of discussion on the subject. I think if you do a search for vit, you'll be able to find additional information and examples.

  • How to display the status of a SubVI on the front panel?

    Hi,
    I am writing a program to control an instrument through a serial communication port. The control and communication functions are integrated in a SubVI and they work fine.
    In the front panel of the main VI, I want to add some indicators to display the status of those controls in real time, such as using some LEDs to show whether the program is running in some loops of the SubVI, or use some indicators to show some variables in the SubVI.
    I tried using global variables, but I can't make them work in real time (or maybe I didn't do it right). The values of the global variables are actually changing on the fly, but the indicators on the front panel wouldn't reflect those changes until the program return
    ed from the SubVI.
    Is there a way to do this in Labview 6.0.2?
    Your earlist help is very much appreciated.
    Best regards,
    Hua

    Hua,
    I have attached an example in which a front panel boolean indicator is toggled in the subvi. Also, a front panel stop button is used to stop the loop execution in the subvi. References are passed to the subvi instead of the actual control values.
    Without seeing your code I'm not sure what was going on with the globals, but you had to have a data dependency somewhere which was keeping the code from running until after the execution of the subvi. The code must be totally independent of the subvi in order to run. Also, in order for the update to work it would have to be operating in a loop.
    Attachments:
    Main.vi ‏13 KB
    subvi.vi ‏20 KB

  • How to run a subVI without poping up normally, but when clicking a button, popup the front panel?

    I know pop-up the front panel of a subVi when called by selecting VI Properties>>Windows apperence.
    But what I need to do is: always run the SubVI inside the parent VI as the nornal subVI do without poping up. But when I click a button"show front panel", the SubVI popup the front panel.
    Is there anyway to do this?
    Thanks,

    ossoo,
             You can use a static VI reference to the subVI and then use the Front Panel Open invoke method to show the front panel when you want. I have attached two VIs that show this. I saved these VIs for LabVIEW 2009 so you should be able to open them up and run them in 2009 or later. Add.VI is the subVI that you are calling. The Caller.VI is just a While Loop that contiually calls the Add subVI. Inside of the While Loop is also a Case Structure with a Static VI Reference (you might need to change the path this is pointing to after downloading the VIs to your computer for this to work) and the Front Panel Open invoke method. You can run the Caller.VI and interact with the main Front Panel as normal and see the subVI but then you can click the Open subVI? boolean button and it will open the subVI's front panel. You can continue to interact with the main front panel and see the values update on the subVI's front panel as well. You can just close the subVI's front panel when you are done viewing it. Does this help?
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager
    Attachments:
    Caller.vi ‏19 KB
    Add.vi ‏23 KB

  • Sizing subvi to designated space on front panel

    Hi All,
    Rookie LabVIEW programmer here, just starting to get into it.
    I'm working on an app that has several states, setup/acquire/display
    etc. that I control with a cluster of buttons (ala a training class
    example). So I've placed these buttons on one side of my app and have laid
    out a display area where I want the subvi's to apear (one for each state).
    So my question is, How can I position the subvi to appear in the
    location I have designated on my main front panel?
    Thanks in advance for the help.
    Cheers,
    Gregory Cole
    [email protected]
    "Today's mighty oak is just yesterday's nut that held its ground."

    hi... sorry about that
    There isn't any password protection but just locked (under vi property)
    Here it is.
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    poSubvianfk.llb ‏56 KB

Maybe you are looking for