How to Save & reload front panel position

I would like to save the front panel position into an ini file or registry, so that the next time the program is used, it comes up where the user left it.
With the Invode Method: Front Panel.Run-Time postition.Get positon  
I can get all the position data I want:
left-top
state
monitor
However...  How do I set the same information at startup?   
There's no  Front Panel.Run-Time Position.Set position. as far as I can see...
To set position, state and monitor values, it seems I need to first call  FP.Open for the state, then FP.Run-Time Position.Centered to select the monitor, and then FP.Run-Time Position.Custom to set the position....   
That looks weird and complicated...    Am I missing something here?   Is there a more elegant approach?

NI explains the difference between Property nodes and Invoke nodes as this.
Property nodes access the properties of an object and allow you to read/write those properties.
Invoke nodes perform actions on an application or VI allowing you to get and sometimes set attributes of those actions.
Sometimes there is some overlap between Properties and Methods as you noticed with the "Get Position" method and the "Panel.Position" property. But most of the Methods do not have a similar Property. For instance, there is a Method you can use on a front panel item called "Get Image". This will return image data about the item that will let you save the items current visual appearance to a graphics file. (.bmp, .png, .jpg) There is no equivalent property to do this.
So it really depends on what you are trying to do as to which one you end up using.
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.

Similar Messages

  • 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

  • How to create two front panels

    Hi in my application i am using two Monitors .. 
    so i like to use one monitor for Vision display and control operation (Front panel )
    And another For Motion Control Front panel .. is it possible to do this .. 
    (In this case How to split my Front panel of my Vi ..)

    Hi
    If we use Border Layout, the Panels which are added to the main panel are not displaying properly.
    Solution is to use BoxLayout with AXIS parameter. Statement looks like this:
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout(PAGE_AXIS));
    Thank You for giving Reply,

  • How to add silver front panel theme for labview 2010

    how to add silver front panel theme for labview 2010

    Mahisnair wrote:
    yes i had tried this way but the vi built with silver theme doesnt look good in 2010 :-(
    wish if there was a way to include silver theme in 2010
    The only way I see to make it like that would be to recreate the theme in LabVIEW 2010 with external bitmap objects. Unfortunately it won't be as functional as the silver controls in various terms such scaling (bitmaps scale very badly) or transparency and click through functionality (a bitmap assigned to a control part will always catch all clicks and never allow a click to pass through anywhere to a lower layered part).
    The silver controls are using special internal graphic objects that were added in LabVIEW 2011, so recreating silver controls with the same functionality in earlier LabVIEW versions is impossible.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Front Panel Position Confusion

    In my program I have multiple wavefrom charts; I would like to call a reentrant subvi, ie small dialog window, that "pops up" over each chart, see attached picture.
    I would like to dynamically set the position of the dialog window to match that of the waveform chart. However, I am having great difficulty in making any sense of the position, front panel bounds, chart position property nodes. I thought if I set the front panel position in my dialog window to the plot position, the top left hand corners would align. However, that is not working for me.
    Any help would be appreciated.
    Cheers,
    Andrew
    Solved!
    Go to Solution.
    Attachments:
    Snap1.png ‏23 KB

    I'm attaching 2 VIs that I hope will help, if I've understood what you want.  It's extremely sloppy and incomplete but the idea is right.  You click on the chart and some text pops up at the top left corner of the chart, regardless of where the chart window is on the screen.
    The position of the chart within the panel will not change when the window moves, because the position of the chart is relative to the window that contains it.  So, you can use the chart position as an offset from the window position to find the position of the chart in real coordinates, which you then use as the position of your pop-up.
    Attachments:
    Text Pop-up.vi ‏10 KB
    Chart with Pop-up.vi ‏22 KB

  • Keeping Front Panel Position the same at runtime

    There has been some threads on here that say to set the Pane.Origin to 0,0 and that will set your front panel position to 0,0 every time you run.  I can't seem to get this to work.  I created a property node under GObject.Origin.  Then I tied a constant to the input and a constant to the reference.  I keep getting an error about the reference.  Any advise?  Maybe another way to do it?  I'm probably just doing something wrong.
    What I am trying to accomplish is when I am developing on the front panel and moving things around, I want the front panel to always run from the same position when I go to runtime.  I have tons of buttons that border the edge of the bottom of the screen and so they get covered up if I don't set the front panel back perfectly.  I am not using the scroll bars and the title menu is completely gone.  All that the user sees is the front panel that I have created.
    Thanks. 
    Solved!
    Go to Solution.

    I believe you need to obtain a reference to the pane starting from a "this VI" and working your way down the hierarchy, like this:
    This sets the origin on the first pane.  If you have more, you can put the last property node in an array and remove the index array node.
    (edit: note that the second property on the VI PN is a typo)
    This is a common thing to want to do at run time, but some of the other things you mention are a little suspect.  Why do you have "tons" of buttons off-edge?  There are a number of ways the user could accidentally see those despite your efforts to keep them hidden.  What function do they serve if they are GUI elements but excluded from the GUI? 
    Message Edited by blawson on 04-21-2010 02:02 PM
    -Barrett
    CLD

  • How to resize the front panel to fit different resolutions

    I m using LabVIEW 8.2 on Windows XP SP2
    I've tried both “maintain proportions of window for different monitor resolutions” and “scale all objects on front panel as the window resizes” selected but just messed up everything when i switched to another different resolution. It's annoying since I'm using 22 inch monitor to do the coding but the user supposed to run it on laptop or wince.
    Any solutions to it?
    Thx in advance.

    Thank you all. Following is the reply from NI support.  I think the best way is to edit vi in low resolution.
    One of the easiest ways to tackle varying screen resolutions is to design
    the front panel to the lowest resolution that you expect it to run on. It
    should then look acceptable on any screen larger than that.
    However, you can get a bit more tricky by programmatically determining the
    computer's screen resolution and then dynamically changing the size of your
    front panel objects. Use an Application Property Node and select
    Display>>All Monitors to return the current screen size. Then, according to
    the screen size, you can size the control or indicator programmatically
    using the Size property node for your front panel objects.
    Ultimately, these issues have often been a result of font size issues.
    Specifically, this can be a problem when two machines have different
    desktop theme/font settings. If your objects are coming out in different
    sizes on different computers, you can setup up LabVIEW to use the same font
    on different systems by modifying the .INI file.
    The easiest way is to do this: use Tools->Options->Fonts from the LabVIEW
    GUI. You can then set the system fonts to anything you want. After you
    have done this on one machine, open your INI file (it is in the same
    directory as the LabVIEW executable) with any text editor and copy the
    corresponding entries to another file. Add these entries to the INI files
    on any machines you want to lock to font. You will probably run into
    issues if you are supporting different platforms (Windows and Mac or Mac
    and Linux, for example), since the fonts you want may not be available on
    both platforms. There are Windows fonts available for both Mac and Linux
    platforms, so this can be somewhat ameliorated.
    This is all I can think of, but that's not to say these are the only
    solutions. You might check the Discussion Forums, as many of our LabVIEW
    Champions have tackled similar issues and offer their expertise as well.
    Here's just a few threads that I'd like to refer you to:
    How to make the size of VI and controls unchanged irrespective of the
    resolution?
    http://forums.ni.com/ni/board/message?board.id=170&message.id=273613&requireLogin=False
    How to program the front panel size to fit different monitor resolution?
    http://forums.ni.com/ni/board/message?board.id=170&message.id=87160&requireLogin=False
    I hope this discussion helps you along the way in your application
    development. Please let me know if you have any further questions/comments
    and I would be happy to discuss them with you.
    Otherwise, it was a pleasure assisting you and thank you for choosing
    National Instruments.

  • Save a front panel image problem

    Hi, i'm trying to save at run-time an image of my front panel, and the little code with the Invoke Node (FP.GetImage) works well but there is a problem, i have a background image for my front panel and this image don't show up in the image saved so i have an image with controls and graphs but a blank background. Is there some way to obtain an image of my ENTIRE front panel? Thanks

    Hi,
    Here's how I got ride of tghis issue, I use Windows "printscreen" function by simulating a keyboard stroke and then I get the data from clipboard (crop it it necessary) and save the image.
    What I like about it is that the "crop" makes it easy to get just what I want when there's more than one monitor.
    What I don't like is that it's a windows only solution.
    Hope it helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • How to set the Front panel to "Set origin at top left"???

    Hello all,
    Whenever i run the program the position of controls and indicators in sub panel changes so i wish to set the front panel which i am calling in sub panel to set its origin at top left corner. but i dont know how to do that.
    Can anyone help me in this???
    Thanks in advance...
    Pals

    Hi All,
    This is the sub vi which i need to call in sub panel.....
    Scroll bar on mail vi is ok but to make all the controls ad indicators visible i need to keep on scroll of called vi also.
    Thanks a lot...
    pals
    Attachments:
    Untitled.jpg ‏80 KB

  • How to open remote front panel of vi's within an executable from an executable.

    How do I remotely open front panels of subvi's contained within an executable, where both computers just have LabVIEW Real Time loaded (programs are run as executables)? I want to use the Method: Remote Panel Open Connection to Server to make this work. I have been getting error 1032 "VI Server Access Denied". I do not want to use the web page method (connection is too slow when controlling front panel objects and I can not programmatically exit out (release control of vi) of the web page).
    Ex. 
    PC1: Has executable1 using Remote Panel Open Connection to Server Method etc. code inside. This program will make a call to executable2 (on PC2) to open up different vi front panels (within executable2), so the controls can be changed from PC1. I want to be able to make changes to the vi's running on PC2 from PC1.
    PC2: Has executable2 containing several subvi's.

    Not sure if this is what you are looking for but here is how to launch executables that can interact
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

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

  • How to keep a "front panel" open during another sequence?

    Hello everybody,
    I'm new on the TestStand forum and I have a question for my project.
    I need to make a test sequence with several sub-steps: Barcode reading, Data reading, Data analysis etc... and all these steps in a "For" or "Do... while" loop under TestStand.
    Before doing the loop, I want to create a "global HMI" step using labview, with on the front panel, the status of each sub-steps. I need to update the status of each sub-step after their execution. 
    The sequence TS is:
    Step Action Labview: HMI.vi (display front panel when calling vi)
    Loop for
    Barcode reading
    Data reading
    Data analysis...
    That's why I need to keep the front panel of "HMI.vi" always open to updated /display the status of each sub-step. (something like colors of a LED). I doner 't want to call the HMI.vi after each sub-step.
    I understood it's a multi-threading process and the reference of HMI.vi should always be active during all the "for loop", but I don't how to keepthe reference.
    Could you please kindly show me how to do it under TestStand (verstion 4.1) with LV (7.1).
    Many thanks in advance, 

    Hi zuzu,
    A UIMessage is typically used as a method to alert and pass information from your sequence or code modules to the User Interface. 
    For a good discussion on this, refer to the section titled "Communication from the Test to the User Interface" here:
    Developer Zone Tutorial: Best Practices for NI TestStand User Interface Development
    However, you can register a callback to listen for these UIMessages in other parts of your code besides the UI as well. That's what we are doing in this case with the floating panel.
    So basically, in your "Update HMI" step, you would post a UIMessage using RunState.Thread.PostUIMessage.
    This posts the UIMessage, and you can pass whatever value you want from  the "Update HMI" step to the HMI.vi.
    For information on the function call, refer to:
    NI TestStand Help: Thread.PostUIMessage
    In this case, we are sending a UIMessage with message code 10200, along with 2 pieces of data, Locals.Progress (a numeric) and "TestProcedure" (a string).
    Typically, you can pass a Number, a String, a Boolean and a Variant with each UI Message. If you need to send multiple pieces of data of the same type (your second question), then you should bundle them together into an array or cluster (container) and pass it via the ActiveX parameter.
    See the following forum posts for more details:
    reference a numeric array in PostUIMessageEX
    HOW To pass more than one numeric data with ActiveX postUIMessage
    Jervin Justin
    NI TestStand Product Manager

  • How to create a front panel display that lights up with different colours depending on its input signal?

    I am doing a project where I have this array which has different voltage outputs for each grid. How do I create a front panel object that lights up with different colours depending on the voltage input or is there already such a pre-built function?
    In addition, I wish to display these in an array on screen. Is there any pre-built function for this?

    Repulse wrote:
    I am doing a project where I have this array which has different voltage outputs for each grid. How do I create a front panel object that lights up with different colours depending on the voltage input or is there already such a pre-built function?
    The simplest way would be an intensity graph. It gives you a 2D grid where each grid point is colored according to the value of a 2D array. The Z axis color ramp determines the color.
    My second choice would be an array of colorboxes. (They could even be made to look like LEDs (see image, if course you can leave them square too), All you need is a scaling function thap maps voltages into a color ramp lookup table with an 8bit index)
    (Using booleans and color property nodes is relatively clumsy. Booleans are meant for two states because the value is boolean. Since array elements can only differ in value, and not in properties, it will not even work. Color boxes have a color data type which is much more appropriate for this case)
    LabVIEW Champion . Do more with less code and in less time .

  • An idea of how to create a front panel

    Hi all,
    Want to create a front panel using LV 8.  The panel using a vertical splliter bar to divide the panel into 2 sub panels, the left will be small , the right will be somewhat bigger than the left and as the main infomation display area. when click the splitter bar , the left panel can auto hide or collapse , if  click it again , the left panel  can open again . Please give a suggestion of achieving this . Thanks.
    David 

    Hi David,
    Yes, you can customize the positions of splitters, and as a result, control the size of the panes on your front panel.  Here are some of the different properties you can change on a splitter bar:
    Position on panel (i.e. horizontal pixel location of vertical splitter or vertical pixel location of horizontal splitter)
    Foreground and background color
    Whether or not it is "locked" (i.e. can't be repositioned by the user while the VI is running)
    The sizing attributes of the attached pane(s) when the splitter is re-positioned
    There are also several properties of the Pane class that relate to the panes on either side of a splitter.  Let me know if you'd like more information about those (although I suppose you could look for yourself at the LabVIEW 8.0 Evaluation version).
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • 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

Maybe you are looking for