Make current values default

Hello ng,
Can anyone tell me how to programatically make
the current values of all controls on a panel the
default values?
Furthermore, can I set all controls back to their
default state programatically?
Thanks!
Charlie Solomon
Raytheon Systems Co.
[email protected]
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Are we talking about LabVIEW 5 here? If so check out the VI Server
functionality.
In the Functions palatte under Application Control you can open a VI
reference to
a VI with Open VI Reference and then using the Invoke Node you have both
"Make Current Values Default" as well as "Reinitialize All to Default
available".
These functions match exactly the same commands in the Operate menu.
[email protected] wrote in article
<7qkdgv$di6$[email protected]>...
>
> > For every control you want to set back to a default value, make a copy
> > of it on your front panel, and set the default value. Now, when you
> > want your control to go back to default, set it via a local variable
> > ("Copy of Control A" -> 'Write' local of Control A
>
> Thank
s Rick,
> That would work for resetting controls to the same default values every
> time...I should explain my app better: I have a subvi that pops up
> a "setup" panel, allows the user to change some controls, then gives
> the option to Save or Cancel. Save button should make the current
> panel values the new default, so that next time the app is closed and
> reopened these new values will be in place. Cancel button will undo
> the changes and reset the controls back to the default state.
>
> Only thing I could find in the Help was some reference to
> a "Make_Current_Values_Default" DLL, but no info on how to find it or
> access it.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Invoke Node - Make current values default

    I have an issue similar to many postings regarding the use of an invoke node to set control values and then to make those values default in that I get an error message: "Error 1000 ( The VI is not in a state compatible with this operation)."
    The catch is that it is not all the time.
    I am trying to set up a configuration utility which allows configuration or modification of settings of channels and serial ports. This top level VI pulls values from a configuration file using a mid-level VI which, in addition to loading the configuration file, also calls a further sub VI which initialises and sets as default front panel objects on a number of VI's using Invoke Nodes. Thus there is a heirachy of three VI's
    with the lowest level VI doing the Invoking.
    The only time I get the Error 1000 is when I try to run everything from the top level VI. From any lower level the VI's run with no problems and the defaults are set as desired.
    Any suggestions as to the origin of the problem?
    Ross.

    To complement the other answer that explains why it not always works, I would again and again stress that !! make current values default !! is not the way to go when you want initial values to be changed.
    For changing startup values you should use .ini files !
    greetings from the Netherlands

  • VI to make current values default

    Hi, I've used this website:
    http://www.originalcode.com/SavDef.htm  to create a method that
    will call the "Make current values default" at the end of my program.
    Here are my Save defaults.vi and Save defaults core.vi
    The latter works but the former gives me a bad input error... I admit I
    am not advanced enough in Labview to fully understand these two
    programs so I just built them both visually from the website, as I need
    my larger program to save the current defaults when it's done running.
    Thanks for any help!
    Attachments:
    Save defaults.vi ‏37 KB
    Save defaults core.vi ‏35 KB

    It's difficult to explain (and unfortunately I don't have much time)..  but the 'Set Control Value' methods in the Save Defaults.VI  are actually setting the values for the controls in the Save Defaults Core VI.  You instead had constants.  I changed these to Controls and named them accordingly (i.e., "occurrence" and "VI to save").  See attachments.
    I am guessing "Relative position.vi" is your VI where you wants the defaults to be saved.  So, you will add the Save Defaults VI as a sub VI in this VI.  You do not have to explicitly give its path anywhere as that is obtained from the call chain. 
    I have not tested this.. but it should work now.  You will have to rename these to the original names, including spaces, etc.  (or change the names on the diagrams).
    Hope this helps.
    -Khalid
    Message Edited by Khalid on 11-15-2005 01:51 AM
    Attachments:
    Savedefaults_1.vi ‏38 KB
    Savedefaultscore_1.vi ‏36 KB

  • Reversing the Make Current Values Default command

    Hi,
    I was working with a labview program this evening and had been using the 'Reinitialize all to default' command under the operate menu to clear all of the waveforms on my screen.  However, I accidentally chose the 'Make current values default' command and cannot erase what shows up in the waveforms.  I am sure there is a simple fix to my problem but I couldn't figure it out.  I tried rewiring parts of my block diagram do exclude the waveform graphs with the hope that the waveforms would go away but realized that the graphs weren't wired so nothing was going to change.  Any help would be appreciated.
    Thank You,
    bsteinma
    Solved!
    Go to Solution.

    There are a few simpler ways than closing and reopening the VI.
    If you realized the mistake right (or soon) after you did it, a ctrl+z will undo the operation and you have your old defaults back.
    If you are past that stage, a simple "menu...file...revert" will revert the VI to the last saved version. No need to exit and reload.
    If you accidentally saved it with the new defaults, "right-click the graph...data operations...clear graph", make default, save VI again.
    Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • Make current value default - Undo action

    Hi,
    A simple question - when selecting with the right mouse button a control and pressing "Data Operations/Make Current Value default" how I can undo this operation? Imagine I set some control default value to something and after some time I changed my mind and I want to return the control to its initial value (as it comes when you place the control from the pallete -  "Set to factory value").  I was not able to figure out how to do this. Cntr - Z is not an option since it works only in the close vicinity of the operation (you can't Cntr-Z this operation after 2-3 hours of intensive work over the VI). 
    For example I set numeric control default value to 22, after some time I want to return it to initial state (in this particular case the "factory value" is 0). Well, I can reinitialize the value to 0 but it's different from setting it to "factory" settings.
    Thank you

    I disagree with the idea that the default value is not a valuable tool.
    One example is let's say you have a subVI that had a hardcoded constant, but in new applications, this value is to be fed in from the outside - i.e., the constant is to become a control connected to the connector pane.  This subVI is in a common library so it needs to maintain compatibility with older applications.
    So you right-click on the constant to make it a control with the default value already set to the original constant value, connect it to the connector pane and set the connector to anything but required.  Now the new software has a connector to hook up to while, even though the old code will have to be recompiled, it won't break because, even though there is nothing wired to the control, the default value works just fine.
    I can think lots of other things, but that is among the most useful thing I've done with default values.
    [edit] Maybe I took things a little out of context? [/edit]
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How can I use "Make Current Values Default" Programmatically?

    When I use this method in a Invoke node, I get the error code 1000, then i can't use it in run mode?
    How can I modify the default values in a Built aplicattion, and save for the next time I load it?

    Hi,
    I've attached a small demo to show setting up the front panel control. The VI Change Control Value.vi is the one you run. Demo.vi has one control on the front panel whose value is setup by Change Control Value.vi. Just unzip the file, keeping the two VI's in the same folder. You don't need to open the Demo.vi.
    I've used this mechanism onlong with a config file when creating a Virtual Instrument Driver.
    Regards
    Ray.
    Regards
    Ray Farmer
    Attachments:
    demo.zip ‏23 KB

  • Make current values default in dll

    Hello,
    I build a dll in LV7.1. There is a function (.VI), where I have to open a reference of another VI, modify its default values on somel controls, then somehow save and close the reference.
    This means, that if I use another function of my dll, which function needs those modified values, the new values are used. Is there any way to do it?
    I tried to use the invoke node "Set Control Value" on a static VI reference of the VI.  The changes are made on the controls, but the lifetime of my changes ends, if the dll is unloaded. Then I have to do the changes again.
    I know, that a dll cannot be saved through a function of it, with new values. But what is the solution? Globals in the dll?
    regards
    Mitulatbati

    Well, the idea would be to read/write the file only once.... So you would create an FGV/AE to read the settings at the call of the first function of the dll, keep the values until the last call will use the FGV/AE to write the settings back to file.
    This change could possibly require a certain "setup" and "shutdown" routine in your dll which must be called from outside when using the dll. And it for certain creates issues if the dll is used without proper usage of those functions.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Method " make current values default "

    hello
    I use method of "make defult" and it works well but I must build application this vi
    when I do this (tools ->build application ...-> installer setting) and  run
    show  this error :
    Error 7 occurred at Open VI Reference in mainpage.vi
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file
     path might be incorrectly formatted for the operating system. For example, use
     \ as path separators on Windows, : on Mac OS, and / on UNIX.
    I add configure.vi  as dynamic file and when I press configuration buttom and
     then press ok buttom show this error:
    Error 1044 occurred at Invoke Node in make defult.vi->mainpage.vi
    Possible reason(s):
    LabVIEW:  VI is locked.
    please guide me how I can use this method and also make installer file
    Thanks alot
    Faeze Zar

    I don't think you will need to upload your VI for this issue, but have a look at the bottom, the "attachment" section lets you select the files you want to upload.
    Message Edited by TiTou on 12-18-2007 08:51 AM
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    upload.png ‏15 KB

  • How to make the current value default programmatically

    How to make the current value default programmatically

    Open a VI reference to the desired VI and use invoke mode with method: "Make current values default".
    The VI cannot be running, so you need to set it from a different VI. (It also means, it cannot set itself.)
    LabVIEW Champion . Do more with less code and in less time .

  • How to make current value to default to all controls at once

    Choosing "Data Operation" -> "Make Current Value Default" to multiple controls requires a lot of clicking. Is it possible to do this with one click?
    Solved!
    Go to Solution.

    Yes.  If you select no controls, it says "Make current values default", and it does all the controls at once.  If you have a control selected, then it does only the selected controls.
    Reinitialize current values to default works the same way.  Select nothing, it does all the controls at once.
    Bob Schor

  • Making Current Values Default While VI is Running

    Is there a way to 'make the current values default' while a VI is running?

    You know, i try to read these posts really quick because i do this at work
    (my boss doesn't mind because i learn things too). Anyway, my dyslexic mind
    interpreted the subject line as initialize to default values. Sorry. Craig,
    i think that's twice you corrected me. Thanks.
    But now i have a question. Why would you want to set the current values
    to default? So after stopping then re-starting the program it starts with
    the last know values? (i know, thats really 2 questions). The way i do
    this is to use the simple configuration read and write vi's to some ini file.
    On program close, write the values. To make sure this is done, take the
    stop button away from your users and use a front panel quit button that will
    execute the write code before calling labview exit. Obvisously, on program
    start, read from this file to return your controls to the last know states.
    Hope this helps, sorry for the confusion.
    Jared
    "Craig Graham" wrote:
    >Uh.. perhaps I missed this. Certainly you can set default values via>property
    nodes, but I was under the impression only for a VI that isn't>running or
    locked for running- i.e. in the hierarchy of another VI that is>running.
    Am I mistaken?>>Hence a VI can load settings into another VI's front panel
    controls, set>them as default and then use an "invoke node" to run the VI,
    but there's no>way a VI can set its own front panel defaults unless you use
    some horrible>method whereby it launches another VI, via "invoke node" since
    the>hierarchies must be independent, the other VI aborts the first, sets
    the>font panel defaults and then relaunches it, using "invoke node" before>killing
    itself.>>jared wrote in message>news:[email protected]...>>>>
    Yes, you have to use property nodes. This will only work in the>development>>
    enviroment. If you compile into an .exe it won't work. This was discussed>>
    last week or the week before on this group. Search using keywords from>your>>
    subject line, i'm sure you'll find alot of info. I also created a sample>>
    of how to implement this in an .exe. If this is something you would like,>>
    email me and i will respond with it attached.>>>> Jared>>>> "Peter T"
    wrote> >>Is there a way to 'make the current values default' while a VI
    is>running?>>>

  • Automatically making current values default in an exe

    Hi,
    an old but evergreen topic once again. We all know that there is no simple "Make current value to default" option anymore if we built an exe. Nevertheless in many cases there is a need to have exactly such an option. The common advice is to work with an ini file and write all current values of all controls into that file. By starting the exe, the ini file must be read first and the values must be written to property nodes of the controls.
    This strategy works well for small applications with few controls. But what if there are some ten, twenty or even more controls of various types? The necessary code gets easily very bulky and difficult to adapt if changes in the controls become necessary.
    Is there any universal vi around which collects automatically the values of all controls regardless to the type of control, writes it to a file, loads that file again at start of program and sets the controls to their initial value?
    Regards,
    Peter

    Peter,
    > thanks a lot for your big effort. I followed the
    directions given in the FAQ you are pointing to. However, I couldn't
    get the vi package manager connected to the internet yet though I tried
    all obvious things like switching off the firewall and playing around
    with the internet options.
    I'm sorry that you're having trouble downloading packages.  Are you behind a corporate proxy server or firewall?  VIPM does support some proxy servers (settings are in the Internet tab of the Options dialog) but it does not support certain authentication schemes of Windows Proxy Servers.
    > Why isn't there a simple download for the Open G
    packages? It would make things much easier. I don't have any idea how
    to get these packages if the internet connection of the manager doesn't
    work.
    Well, VIPM is supposed to be the "simple download".  The alternatives are much less easy.  There are so many different packages, that creating a single download file would be very time-consuming for the OpenG developers.  That said, you can download the package files individually from the OpenG Toolkit project page at SourceForge.net.  However, it would be great if we could figure out why your VIPM installation cannot connect to the Internet.  Can you look to see if there is an error message in the error logs folder ( C:\Program Files\JKI\VI Package Manager\error\ )?
    Thank you,

  • Can't find 'Make current properties default' in Text Tool

    Acrobat XI Pro
    11.0.06
    Win 8.1, 64 bit
    I'm trying to change the default font size for my Add Text tool.
    What I've been trying is creating a text box and adding some text in it.
    Then I try right clicking in the box, on the text, after doing a Select All.
    None of the boxes that pop up give me the option to 'Make Current Properties Default'.
    What's the right way to change the defaults to Add Text?
    Thanks.

    Unfortunately there is no way. I'd also like this to have. But you need to remind yourself that Acrobat is not a text editor.
    All you can set in the preferences is font and font height for comments.

  • Make 2 values default in Z Report

    Hi,
    We want to make a Field as default in my Z Report.
    For that i use default function for one values, but we have 2 values to insert in that field.
    How can we make 2 values as default in field and also make non-changeable mode. means we want that user cann't change the values, inserted in that field.
    Plz guide...

    Try following Sample Code :
    PARAMETERS:      p_todate LIKE sy-datum DEFAULT '20001220'.
    * At Selection-Screen Output
    AT SELECTION-SCREEN OUTPUT.
      PERFORM disable_to_date.
    FORM disable_to_date.
      LOOP AT SCREEN.
        IF screen-name = 'P_TODATE'.
          screen-input = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    Hope this helps.
    Regards,
    Chandravadan

  • "Make current properties default"

    I have accidentily clicked the setting to make current properties the default on one of the tools in Acrobat, how can I turn it off so it resets back to default settings before I clicked this?

    It is the area measuring tool so I don't want there to be a default. I want it to measure the area I select each time I select it. But as I accidentily clicked this button it is now remembering that shape everytime I try to measure an area. Is there a way to reset it so there is no pre-determined area and it measures it each time like it did before?

Maybe you are looking for