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

Similar Messages

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

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

  • 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

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

  • How can I show the current value of a substitution variable in FR?

    Hello,
    I want to paste the current month in a text box using a substitution variable in my report. How can I use the Curmth sub-var in a text box? Which function would I use to paste the substitution variable. Thank you.
    -- Adi
    Edit:
    The Sub-Var is not used anywhere in the report but it is in the database that the report accesses.
    Edited by: Aditya26 on Apr 12, 2012 8:42 AM

    I think you can only reference items on the actual report.
    It might be easier to pull the subvar into the report (on a hidden column/row) and then you can reference the cell.
    Cheers, Iain

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

  • JPA - How can I use the table's default Date types? e.g. CURRENT_TIME

    Once again, can't find an answer anwhere.
    I would like to know if/how one can use the default date/time/datetime types as declared for the target table when attempting to persist an entity having these fields set as null.
    create table item
         item_id INTEGER NOT NULL PRIMARY KEY DEFAULT AUTOINCREMENT,
         date_created DATETIME NOT NULL DEFAULT NOW(*),
         date_updated DATETIME NOT NULL DEFAULT NOW(*),
    );Now how can I get the above table to work when attempting to em.persist(myItem) whereby dateCreated and dateUpdated are both null?

    I should also mention that TopLink has always supported the ability to retrieve the current time from the database for use in optimistic locking. The TimestampLockingPolicy offers the ability to configure the next value being retrieved from the database instead of using the local time from the JVM. Our extended optimistic locking configuration does not currently support setting this option but it could be done using a descriptor customizer which can be configured in your persistence unit properties.
    Using optimistic locking may be a good solution for the last modified date since it will also ensure that you do not corrupt the database if someone else has incremented this value since your last read.
    Doug

  • HT2731 How can I use my current iTunes account to make purchases when I can no longer remember the answers to security questions? Help!

    What do I do when I have forgotten answers to iTunes log in security questions?
    Do I need to close my Apple account to get this fixed? If I keep guessing
    at the answers it locks me out for 8-24 hrs): Help!!

    Itunes has nothing to do with photos.
    iCloud: Photo Stream FAQ
    iTunes 10: iTunes in the Cloud
    iCloud: Mail
    iCloud: online
    iCloud: Contacts
    iCloud: devices
    iCloud: iCloud
    iCloud: syncing

  • How can I use the output value from SIMPLE PID to write something to the serial port?

    I am working on my Senior Design Project that requires the use of incoming compressed air, propotional valves, continuous servo motors, and a serial servo motor microcontroller.  I have figured out how to send byte sequences to the microcontroller through LabVIEW using the VISA serial write function.  The motors are attached to the valves to control the flow rate.  I have created my own simple feedback system using a bunch of case structures but I realized that I am basically trying to recreate the wheel (I basically was writing my own PID VI).   I have an older version of LabVIEW (7.0 Express) and theres no way to upgrade or buy the PID toolkit, so I am stuck using the Simple PID VI.  Also, the only way the motor works is sending an array of bytes to tell it to turn on/off, direction, and speed.  Is there any way I can use the Simple PID VI in conjunction with the VISA SERIAL write function, or is there any other way I can communicate with the serial port using this pid vi?  Any information would be appreciated.

    Hi gpatel,
    you know how to communicate to serial port, but you don't know how to send a value from SimplePID to serial port???
    You know how to communicate, but then you don't know how to communicate???
    You should explain this in more detail...
    Edit:
    From you first post you know what values your motor driver is expecting. You know which values the PID.vi is providing. Now all you need is a formula to reshape the values from PID to the motor. It's up to you to make such a formula. Unless you provide any details we cannot give more precise answers...
    Message Edited by GerdW on 02-28-2010 08:35 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 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

  • My email address has changed on iphone, but the orignal old email address keeps popping up for password and I cannot reset it as my old email address was hijacked and closed.  How can i use my current email address for all iphone functions?

    I have iphone4s with the operating system of 8.1.  I changed my email address which was used to register my iphone due to hijacking.  I am able to read all my emails using the new address.  However, I can not download apps as it keep asking me to provide the password for the original registered email address.  I do not have the access to the email address, so I can not retreive the password.  I want to clear this mess by resetting everything, and register my current email address as the only one to communicate on my iphone.  Please teach me how?

    settings - app/iTunes store - sign out and sign back in with your new id.
    Note - if your older apps needs an update it will use your old apple id and password, as Apps are tied to the apple id that was used to purchase it.
    You can't merge apple id.

  • How can I use an iteration value from a "while" (or "for") loop as part of a filename?

    I am using the "Write To Measurement File" function  inside a while structure and would like to incorporate the iterative value from the while-loop as part of the file name. I'm not sure how to do it. Any suggestions?

    Like this:
    Edit: Oops. Sorry for the double answer.
    Message Edited by smercurio_fc on 05-22-2007 04:25 PM
    Attachments:
    Example_BD.png ‏3 KB

Maybe you are looking for