Dynamic front panel

Hi,
I'm working on a VI that will be used to control a number of RC Quadcopters and cars.
The VI gets the amount of vehicles from tracking tools, and then runs a loop and finds out for each vehicle if it's a quad or a car.
Now that that stage is completed, I want the front panel to display a line of controlls and indicators for each of the vehicles, and have a different line for quads or cars (i.e for quads I need indicators for x, y, z coordinates and a "takeoff" button, while for cars I need indicators for x, y coordinates and a speed limit control).
Is there a way to create the front panel dynamically depending on input?
the best way I found up until now will be using invisible tabs, so I'll have a tab for each number of vehicles containing said number of lines, and then each line would have two tabs (quad/car), and the tabs to display would be picked at runtime.
The problem is that that would require me to set a maximum number of vehicles, and would require a lot of work if I'll introduce a new type of vehicle, so I'd rather have a more modular system.
I would love some fresh ideas about that problem.
Thank you!
Shayelk
Solved!
Go to Solution.

shayelk wrote:
looks great, I'll try it out!
In the example you attached the different controlls are displayed in a number of windows, is there a way of displaying them in a single FP?
thank you!
Yes!
Use subpanels. 
I'm assuming you are LVOOPing the class "RC Vehicle" with children classes of "RC Car", "RC Plane", "RC Submarine.Yellow"...etc?
Just dynamically dispatch the "Control RC vehicle" methods to a subpanel.
OK, "JUST" is an oversimplification..... but that is the way I would look into if it was my project.
Jeff

Similar Messages

  • Is there a way the user to change the equation in the formular node from the front panel on the fly, dynamically?

    Is there a way the user to change the equation in the formular node from the front panel on the fly, dynamically?

    Try the Parser VIs (also known as LV Mathematics VIs, or simply GMath VIs) located under the Analyze>>Mathematics palette (not in the Base package). You might want to start with the "Eval Formual Node.vi" located in the Analyze>>Mathematics>>Formula palette. There are many differences between these G-based, dynamic formula VIs and the LabVIEW formula node, but these VIs often prove quite useful when your formula changes on the fly. For more detail on the differences, see the LabVIEW Help file (Cntrl-Shift-? from within LabVIEW) under the topic "Mathematics VIs, parser differences with Formula Node".

  • Is there a way the user can change the equation in the formular node from the front panel on the fly, dynamically?

    Is there a way the user can change the equation in the formular node from the front panel on the fly, dynamically?

    Sorry, I don't think so. That would be pretty cool if you could create a property node for a formula node and then enter a formula on the front panel and use it to update the formula. But you can't create a property node for a formula node and the only way of modifying the formula is by typing it into the formula node on the diagram. And you can't modify a diagram of a running VI.
    You could create a VI which is only a formula node with the maximum number of inputs and outputs you expect. Have a button on the calling VI to Edit Formula. When the button is pressed, use a VI server to display the front panel on the formula VI, display a dialog box telling the user how to display the diagram of the formula VI, then stop the calling VI. (You can't edit a sub-VI while t
    he calling VI is running). The user will then need to rerun the calling VI to use the new formula.
    You might be able to do something by calling MatLab or something like that to get an interactive formula window.

  • 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

  • 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

  • Dynamic cluster/array follow up question - front panel

    Thanks for the responses to my last question - they were great and fast!
    I'm still stumped on how to create the front panel. It doesn't really matter whether it is an array or cluster. It sounds like either way, once I have it I can autoindex through it. The basic application here is that I have a VI that will store one XY plot to our database. I'd like to wrap that in a VI that will take N XY plots and store them all in our database regardless of what N actually is. So in terms of creating the front panel, I tried to create an array control and drop a XY graph in it, but it doesn't seem to like that. It said that I hadn't added an element to the array. I also tried to drop a XY graph into a cluster control and that cleared the broken run arrow, but wouldn't I have to know how many XY graphs are being passed in? It seems like I'd have to put one graph in the cluster control for each graph coming which defeats my purpose? Remember I won't know how many XY graphs are coming into my VI in the array or cluster. Anybody know how I can set up the front panel?
    Again thanks for the quick replies!!!
    Best Regards,
    Steve

    Look at the attached VI.
    It has a single XY graph inside a cluster container, and that is inside an array container.
    With this setup, it wouldn't matter how many graphs you pass to the subVI since it's an array, it will take whatever is passed to it.
    Ed
    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:
    XY Graph in Array.vi ‏13 KB

  • How statechart can access front panel dynamic input

    How can I get the value of a control (as set by the user) on a calling VI Front Panel to evaulate/use within a state Exit while loop in of a called StateChart?

    I started with the async statechart example -- contains trigger loop and a statechart loop.  Inside the statechart loop there is a Run Statechart.  Also in this loop are my inputs to the Statechart. Everything is good so far. As each state is entered, the correct input is obtained.  Then I added a PID.vi inside a loop to one of the state action tabs.  When that particular state is entered and the PID loop runs, I no longer get updated input values.  I've tried to copy and reference the Inputs onto the action tab diagram to no avail.
    I've attached my VI and lvsc for some hopeful assistance.
    Attachments:
    BrewLab.vi ‏86 KB
    BrewLab.lvsc ‏496 KB

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

  • Enabling / Disabling graphs and opening a new Front Panel Window

    Hi,
      I have a simple application of showing 12 analog signals on 12 different graphs placed vertically in aligned position. I have to develop a user interface so that if user wants to display signal no. 1, 4 and 6 out of total 12 signals, he should make selection using check boxes and click a re-draw button. It should result in opening a separate window with these three signals displayed as separate graphs aligned vertically and adjusted to fit window size. Similarly later user can change his selection of displaying signals (from same acquired data) say 1, 3, 5, 6, 8, 9, 11 & 12 and click Redraw button. It should result in opening a new Window showing all these signals as separate graphs which are aligned vertically and resized to fit the window. Now I have two major issues in this context.
    1) I have been searching LabView help to locate a way to open a new window for this purpose but I failed to locate any way for it. As per my limited knowledge, it seems that we cannot have multiple "Front Panel" windows in Labview.
    2) For the graph I could not locate a control to enable/disable a graph so that it appears or vanishes. Is there any way to achieve it?
    I shall appreciate your valuable advice. I shifted from "Lab View Signal Express"  to "Lab View" in order to achieve this user interface design but I am still not successful in finding a good solution for this application.
    Regards
    Mnuet

    Hi Mnuet,
    You can do what was said above. Here is a KB on dynamically loading VIs. It looks something like this.
    Dynamically loaded VIs are loaded at the point in code while running, as opposed to being loaded when the parent VI is loaded into memory like normal subVIs. You can make a reference to them and then control the front panel appearance, their run status, etc with property nodes and invoke nodes.
    Jeff | LabVIEW Software Engineer

  • Front Panel DataSocket takes long time to connect

    Hi,
    I have build a very simple DataSocket application.(Front panel DS only)
    I transferring data between two applications running on 2 PC's connected via a wireless network
    What hapens to be is when the router is connected to internet (via ADSL modem) the connection between clieant and server is established imidiatly.
    However when Modem is disconnected it takes about 1 minute to establish connection.
    At both cases I am using the internal IP of the server PC (the PC datasocket server is running on)
    1. I used 2 different  wirless routers and result is the same
    2. I used static IP addres on both client and server PC's
    3. DSTP url I use is "dstp://l192.1.128.106/number" (not computer name but rather ip number)  
    4. datasocket server is running on one commputer. The other (client) is running under Runtime (its an "exe" file)
    5.When I look at data socket server I see that "process connected" is updated immediately. BUT the front panel controls are waiting for about a minute till datasocked LED is turns green. During this time the datasocket server looks very busy.  
    I have to emphasis again when the router is connected to internet connection is established immediately.  
    My gut feeling tels me it has to do with DNS. I don't usderstand why.
    Is is related to the server PC DNS?
    The client PC DNS?
    The router DNS?
    Any help would be extremely appreciated! 

    Thanks again Kyle, I have followed up some of you suggestions. With some trial and error (and a fiew bucks...) the problem was solved. The way I solved it: 1. I bought a new router (Edimax BR-6424 ~$40)2. I have configured the PC the Datasocket server was running on, as with dynamic IP and obtain DNS automayicaly. The router was not connected to Modem and everything is working fine. (if you look at atached VI - "time to establish connection was  about 2S. This is the VI I am running on the client PC) Alternate 2. is configure static IP BUT LEAVE DNS VALUES EMPTY. that works fine too. (2S for connection) When I used static IP with some values in DNS the time to establish conection was ~16S. Aperrantly my problem was not related to modem at all.I have made my test with one bad (or misconfigured) router (level one WBR-3406TX).The test I made with the other router (old Edimax I borowed from a friend) were with bad DNS configuration.So I got wrong impression that my problem was related to absence of modem. I am going to use the new router. But just for curiosity. Do you have any Idea what could get wrong with the old router (level one). The DNS was configured correctly. (obtain DNS automaticaly) but still when I ran the attached VI it took 16-20 S to establish connection.??? Best regards, Hazkel   
    Attachments:
    Dataocket Example.vi ‏11 KB

  • "Shared Variable Control" combo box on Front Panel is empty after Build

    Hello;
    I have a project using shared variables and the DSC module. I am working on building a .exe application now that the project seems to run well.
    I have several places on the front panel where I have shared variable controls. These combo boxes allow the user to click the drop down button and browse the list of shared variables in the project, as well as "browse". When I run the VI from the project, the combo boxes fully populate with all of the deployed tags in the project (I have only one .lvlib in the project).
    When I build the project and run the executable, the only item in the combo box list is the "browse..." selection. I can click on that and browse to my variables, but it is much more time consuming to do so than to simply select the desired variable from the drop down list.
    So, how can I populate the list of shared variables from a particular library ino the Shared Variable Control combo box in a project build?
    A couple of things I have done to try to esolve th problem are ensure that the "Enable Enhanced DSC Run-Time Support" box is checked in the advanced tab of the build window, added the appropriate .lvlib file to the "Dynamic VI's and SUpport Files" window under the "Source Files" tab of the build window, and properly deployed the tag library programmatically in the project.
    Thanks,
    Michael Hampson
    Michael Hampson
    President
    XL Automation, Inc.

    Hi Michael,
    What you see in the development environment is to make it easier for developers, and as far as I know, there's no way to automatically populate the shared variable control during run time in an executable.  The reason being that the shared variable control would have no way to know which process it should be using to get the variables from.  The attached vi demostrate how you can acquire the list of shared variables in a process.  You can also set the default values of the shared variable control by right clicking it on the front pannel, go to Data Operations->Make Current Value Default.  I can do some more research on this, but I'm about 95% sure that there's no way to convert the array of shared variables to populate the shared variable control, as the shared variable control is a special type of xControl.
    Yi Y.
    Applications Engineer
    http://www.ni.com/support
    Message Edited by Yi Y on 07-02-2007 01:27 AM
    Attachments:
    SharedVariableList.vi ‏15 KB

  • Can't remove Front Panels in Application Builder

    I have had a few issues using Application Builder (v7.1) in regards to it removing or not removing front panels for my subvi's when I was trying to compile. Here are the conclusions I came to if anyone else runs into the problems I had.
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    For problem 1, I decided not to worry about linking the files dynamically in the Application Builder, but to just make sure the Application Builder would include their front panels. For problem 2, I had to figure out what was making Application Builder force the front panels to be included when I deemed it unnecessary, so that I could fix them not to be included. Basically then, going through my VI's that were forcibly included, I came up with a list of stuff I began checking for each time I would run into one where I didn't want to include the front panel. I have attached my list to this post.
    My solution for problem 1 was then to use a customized appearance for my static-linked / dynamically loaded VI's, and disable the menu bar (forces the front panel to be included by Application Builder without changing appearance, since I never actually see the FP). My solution for problem 2 was often to remove property nodes referencing text on the front panel controls. Sometimes I was able to perform a numeric->text or enum->text conversion instead of referencing the text of the control itself, and sometimes I realized I didn't want anything to change and that it was ok to include the front panel so I could (for example) get a list of strings for my enum control.
    I have attached the reference list I came up with of things to check for to make sure your VI properties are set correctly if you are trying to get Application Builder NOT to include the front panel of your subvi. The list might not be complete, but it's helped me to narrow down things very quickly and find the problems I was having.
    Attachments:
    ThingsToCheck.doc ‏61 KB

    m3nth wrote:
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    This is expected behaviour. The application has no way of knowing that these VIs will at some time be called dynamically. That would require analysing and understanding the entire program and in cases where you calculate the dynamic VI to be called at runtime it still wouldn't be feasable to do so.
    m3nth wrote:
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    There are several reasons why a front panel is needed. One of them is when the VI is called dynamically, even if the FP is never displayed and AppBuilder will account for that for VIs which have been added as dynamic VI to the project.
    The other is when a VI uses some Property Nodes or Attribute Nodes as they are called now.
    So to solve your problem 1) you could also just drop some property node in the diagram of such VIs and be done with it.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Is there a way to change the colors of multiple VI front panels?

    Hi,
    I am currently creating a LabView program controlling a lot of sensors and actuators. I have based the GUI on a tab-control with different buttons which again opens up different VI front panels in a singel sub panel below. I realy want to have a different color theme on my program than the standard gray LabView theme, but I would like to change the colors for all my VIs in a smooth and quick way. I really would not like to click on all controls, indicators etc. to get new colors, as there are a lot of them! Any ideas out there, if this is possible?
    Thanks in advance!
    Lars

    Lars,
    please note that using the grayscale theme is recommended not only by NI. Using color is very delicate thing since you have to consider:
    - readability of text might suffer due to insufficient contrast
    - overuse of (signaling) color might distract the user from important settings/information
    - color-blind user?
    That being said, you can color the frontpanels of the VIs you include in the sub panel dynamically. Please take a look into attached example on how this could be done (LV 2009).
    Please note that this is recoloring the frontpanel background only. If you need other elements to recolor as well, this can be done similar but is more effort....
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    FP ColorChange.vi ‏14 KB

  • 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

Maybe you are looking for

  • Problems with explain plan and statement

    Hi community, I have migrated a j2ee application from DB2 to Oracle. First some facts of our application and database instance: We are using oracle version 10.2.0.3 and driver version 10.2.0.3. It runs with charset Unicode 3.0 UTF-8. Our application

  • While playing a game thru facebook it times out, how do I stop it?

    While playing this game a black screen appears and a message that it has timed out, how do I stop this? Any help is greatly appreciated.

  • Aggregate value of a transient field is not updated from cache

    Hello together, A view object has a transient field which display the count of records from a view accessor. In the EO for the view object ( of the view accessor) opearations on rows are perfomed from a different view object, this changes are not ref

  • Polaroid LCD 26" with mac mini

    hello everybody, I hooked up my mac mini core duo to a Polaroid lcd using the VGA cable I can see the apple booting up but then I got a blank screen with the no support message...anyone knows whats wrong with it? Mac mini Core duo   Mac OS X (10.4.5)

  • Basic questions about JDK1.4.2 & Netbeans3.6

    Hi All, I am planning to install "j2eesdk-1_4-windows [103MB]" & "NetBeans3.6[38MB]" on my Windows machine. Please, advise me for the following questions. 1) What is the name and version of Application and Web Server which "j2eesdk-1_4-windows[103MB]