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?>>>

Similar Messages

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

  • 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

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

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

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

  • Minimum value/default

    I am measuring a current wich is sometimes negative and want to change the negative values to zero. I tried to choose "Data range" and set the minimum value to zero and then from the menu: Operate, make current values default. Then the value is zero as long as the program isn't running, but as soon as i start to run it, the values are negative again. What shoold I do to make them zero all the time when they are negative? (Of course, I don't want them to be negative when they are positive.)

    The data range attributes (like min/max/coerce...) just apply to the datasource - I think. To limit the display, you could maybe do some limit checking and coerce it programatically.
    A small VI should show what I mean. I am not sure if this is the only solution. You might post your question as well to the "Core" LabVIEW forum.
    Hope this helps
    Roland
    Attachments:
    LimitedValue.vi ‏26 KB

  • I currently have one input but need to run two loops. I cannot get the two while loops to run so that they both pick up the same data, they are both picking up alternate samples. How can I get them to both pick up all of the values?

    The system I am trying to create calculates a number of values based on an input. I need to make the calculations and display the values for an entire production run and for each hour. The only way I know to do this is to create two while loops, one looking at all the values that are received and one looking only at the values for hour long periods.
    Any help would be great.
    Thanks
    RossH

    Why do you think that you have to have two loops to accomplish this task? Why not use one loop and accumulate the same data into two data sets based on the two sets of criteria?

  • Triggerring PXI-4110 to measure 1 current value while HSDIO PXI-6552 generating waveform

    Hi,
    Some question about PXI-4110 to measure current while PXI-6552 is generating the waveform. 
    1. Let say, I need to measure 3 points of current values, i.e. while PXI-6552 is generating sample-1000, 2000 and 3500. On the edge of sample 1000,2000 and 3500, the PXI-6552 will send a pulse via PFI line or via PXI backplane trigger line. My question is, is it possible to trigger PXI-4110 (hardware trigger or software trigger) to measure current values at these points ?
    2. Let say I need to measure the current on 0ms (start of waveform generation by PXI-6552) , 1ms, 2ms, 3ms, 4ms... and so on for 1000 points of measurement, code diagram as shown at the figure below. It is possible for the VI "niDCPower Measure Multiple" to measure exactly at 1ms, 2ms, 3ms .. ? How much time will have to spend to complete acquire 1 point of measurement by "niDCPower Measure Multiple" ?
    Thanks for viewing this post. Your advice on hardware used or software method is much appreciated. Thanks in advance.  
    Message Edited by engwei on 02-02-2009 04:24 AM
    Attachments:
    [email protected] ‏46 KB

    Hi engwei,
    1. Unfortunately, the 4110 does not support hardware triggering. Therefore you cannot implement direct triggering through the backplane or anything like that. However, there are a couple of possible workarounds you can try:
    a) Use software triggering: Say your 6552 is generating in one while loop, and your 4110 is to measure in another while loop. You can use a software syncrhonization method like notifiers to send a notification to your 4110 loop when your 6552 has generated the desired sample. This method, however, will not be very deterministic because the delay between the trigger and the response depends on your processor speed and load. Therefore, if you have other applications running in the background (like antivirus) it will increase the delay.
    b) Use hardware triggering on another device: If you have another device that supports hardware triggering (like maybe an M-series multifunction DAQ module), you can configure this device to be triggered by a signal from the 6552, perform a very quick task (like a very short finite acquisition) then immediately execute the DCPower VI to perform the measurement. The trigger can be configured to be re-triggerable for multiple usage. This will most likely have a smaller time delay then the first option, but there will still be a delay (the time it takes to perform the short finite acquisiton on the M-series). Please refer to the attached screenshot for an idea of how to implement this.
    2. To make your 4110 measure at specific time intervals, you can use one of the methods discussed above. As for how long it will take to acquire 1 measurement point, you may find this link helpful: http://zone.ni.com/devzone/cda/tut/p/id/7034
    This article is meant for the PXI-4130 but the 4110 has the same maximum sampling rate (3 kHz) and so the section discussing the speed should apply for both devices.
    Under the Software Measurement Rate section, it is stated that the default behavior of the VI is to take an average of 10 samples. This corresponds to a maximum sampling rate of 300 samples/second. However, if you configure it to not do averaging (take only 1 sample) then the maximum rate of 3000 samples/second can be achieved.
    It is also important to note that your program can only achieve this maximum sampling rate if your software loop takes less time to execute than the actual physical sampling. For example, if you want to sample at 3000 samples/second, that means that taking one sample takes 1/3000 seconds or 333 microseconds. If you software execution time is less than 333 microseconds, then you can achieve this maximum rate (because the speed is limited by the hardware, not the software). However, if your software takes more than 333 microseconds to execute, then the software loop time will define the maximum sampling rate you can get, which will be lower than 3000 samples/second.
    I hope this answers your question.
    Best regards,
    Vern Yew
    Applications Engineer, NI ASEAN
    Best regards,
    Vern Yew
    Applications Engineer
    Attachments:
    untitled.JPG ‏18 KB

Maybe you are looking for

  • 7.0.1 wont connect using multipule tabs

    -------------------------------------------------------------------------------- Running about 7 tabs open at startup, this has always worked fine, here is the problem and the sequence of events leading up to hope. Any suggestions would be appreciate

  • ICloud storage can I buy extra for just one month?

    I Need to transfer data from one iPad to a new one, there's not enough storage in my current iPad to back it up. Can I purchase more for a month? thanks for any help. JO

  • Apple care on refurb mac

    hi, today i got my refurb mac form currys delivered. I have checked the service on this mac on apples site and it says its covered till november this year. I have been told that if i provide my proof of purchase to apple that they normally extend the

  • Logic receives MIDI but Mainstage WON'T!

    Sorry this is sort of a repost but not quite... *(Midi port working in garageband but not in mainstage)* http://discussions.apple.com/thread.jspa?messageID=11179374&#11179374 Mainstage 2.1.1 doesn't receive any MIDI from my controller. Audio-MIDI set

  • I don't understand my errors (validator)

    I checked my html and css in a validator and I don't understand my errors. For html: Line 22, Column 32: An a start tag seen but an element of the same type was already open.                       <li> <a href="index.html">portfolio </a></li> And for