How to grab value on command and keep it available?

This should be obvious but I don't see it!
I want to grab a value on a wire whenever the user presses a button, and hold that value for use at any time.
So for instance I can rezero an instrument when the user presses the button, by grabbing the instrument output at that time, and by displaying the difference between current instrument output and the grabbed value.
I tried wiring the output of a select node back to one of its inputs to hold the value, and connecting the wire to be grabbed from to the other input, and tying the button momentary output to the control input on the node, but it doesn't like having its output fed back.
Thanks!

Mike, I think I irritated you, and I'm sorry. I have a big machine I programmed years ago in Forth and Assembly, and am reworking it in LabVIEW to be more in step with the rest of the world, but am finding it surprisingly hard and a little intimidating. Many things that were easy before still look hard or impossible, at least at first. I'm irritated at how difficult some things seem, and I let the post show it, so - I appologize!
>First of all your questions betray a basic lack of understanding of how LV works. For example, in LV you don't copy data from one memory location to another.
It's true, I don't have a basic understanding of how LV works. I hear about dataflow, and gather that implicitly this is trying to make a stack-oriented system map to our human ability to navigate through physical spaces, whereas systems that use more named variables are using our language abilities instead. I bet you do, though, copy data from one memory location to another, whether it's apparent or not, whether you use names and assignment statements or not. I think to tare a gage you must copy the present value to someplace for storage. I have stopped looking for the "copy" node, but still have to accomplish the same effect, and have to do so at an arbitrarily specified time.
>And if you don't know how to run a VI you apparently haven't completed the first exercise.
I know how to run some VI's. Somebody else's VI that gives a version compatibility error, no, I don't know how to run that, not without digging into it further. Which I will do. Feel free to ignore this thread until I report back on that. Or longer, of course.
>I would suggest that you take some time going through the "Getting Started" materials that come with LV and perhaps take a class.
Yes. I went through a bunch of "Getting Started" materials, wrote and ran a hundred or so VI's, and took a week of classes from NI. But there still seem to be big pieces missing.
>Second when you do have code that you have specific questions about, post the code so we can comment on it.
OK, here are two VI's that work together: AnalogInstrument01 has a measurement that I now offset with the constant "53.5". Tester01 sets up a task and executes a loop containing AnalogInstrument01, passing that task into it and getting values of the scaled and offset measurement returned to it. In my project I will have other bigger VIs like Tester01, running an asynchronous loop containing AnalogInstrument01 plus others like it. Some are counters that may not miss a beat. Some take varying time to execute. I must maintain one to one correspondence between all the measurement events within that loop. I am pretty sure it would compromise the goodness of data that my system generates to move away from this asynchronous calling loop strategy.
I want to be able to readjust the offset instead of using 53.5 all the time. However, when it's tared, it should appear similarly tared, and behave the same way, to any VI that calls it. Therefore I think this tare should be part of the AnalogInstrument VI and not part of the other parent VIs that call it. However, the instrument must be ready for on-demand reading by a parent asynchronous loop, therefore (I think) not having its own while loop. Can somebody suggest a way of grabbing and holding the value here?
It's obvious how to do it if you can have the loop in the same VI as the tare value. You just pass the tare value around in the shift register for that loop. I added that example as AllOneHasTare01, which reads and tares just fine. Only problem is you can't call it from another asynchronous loop because its own loop keeps it busy.
To be more clear about what I think I need, you can imagine doing this in an object oriented text language instead, say C++. You'd create a Measurement class with a tare method. The constructor would load a private tare field with zero at object instantiation. There's be a tare method that copies the output of the measure function into the tare field. There'd also be a measure method that returns the difference between a fresh raw measurement and the tare field value. Then another class like Tester would own an instance of Measurement and would call the measure function from inside its loop. This sounds easy - but how would I do it in LabVIEW?
Attachments:
AllOneHasTare01.vi ‏16 KB
AnalogInstrument01.vi ‏17 KB
Tester01.vi ‏13 KB

Similar Messages

  • How can I delete the video and keep the Audio  in a few frames using Imovie 11

    How can I delete the video and keep the Audio  in a few frames using Imovie 11?

    I've met the problem too before. but i solved it with  Audio Converter Mac instead of iMovie. If you have similar situation that just want to keep audio but not video, and if your file format is not workable in iMovie, you can use the Audio Converter for help too. it can easily help to extract audio soundtrack from any video format. Or if you need to convert one audio format to another, it is a good choice too, because it supports many common audio output formats.
    <Link Edited By Host>

  • How can I hide the borders and keep it as an option?

    How can I hide the borders and keep it as an option?  I had someone go into the css I believe, and make it so there were no borders visible on the page (I could see the dotted outline while working on it, but when pushed, it wasn't visible (which is what I wanted).  They called it "noborders."  Since I had to reinstall, it went away.  Help?
    I have Dreamweaver CS5.5

    Try this site:  CSS Border
    Add code then type in a zero. Later add border size you want.
    examples:  border: 0px solid black;
    or
    border: 1px 000000;
    or
         border-top-style: solid; 0px 000000;
         border-right-style: dotted; 0px 000000;
         border-bottom-style: solid; 2px 000000;
         border-left-style: dashed; 1px 000000;

  • How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop the fil

    How can I quit (close) Photoshop and keep all windows so that the next time I open Photoshop all the files that I had open are there already in the same position as when I closed Photoshop?
    I've been a Fireworks user for over 10 years and just switched to Photoshop. I cannot find a setting that will enable all my file windows to reopen when I quit Photoshop. This is really a problem since I often work on several files at the same time.
    Please let me know if the feature exists or point me to where I can post a message for a new feature to be implemented. The feature is a must for any designer working on large projects.
    Thanks!

    There is no such functionality. You could perhaps create a script that stores that info in a custom text file and arranges them accordingly in the workspace, but that's as good as it gets...
    Mylenium

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • I've a video with an extra translator voice how can I remove the translator and keep the original voice ?

    I've a video with an extra translator voice how can I remove the translator and keep the original voice ?

    I got the quicktime 7 pro but that did not solve my problem I need to listen to the origenal voice on my video  however  in window properties there is only delete the it deleted all the voices together :'( helllllllllp someone

  • How do I export a file and keep the aspect ratio intact?

    I'm exporting an edited scene from an external hard drive to a macbook but the video on the laptop is anamorphic (squished) compared to the original file on the hard drive.  How do I export the file and keep the aspect ratio intact?

    Please give the exact specs of your project. If the material is anamorphic, aspect ratio display is a function of the playback device. What is it?

  • Please how can I reinitialized all command and my indicator of a VI in one time ?

    I have more than 60 command and indicator in my VI and I want to reinitialized them in one step
    Please help me ( In english or french, )

    IF you wanna re-initialise them to a know state, you may wanna try
    1) create a property node for each of them, wire the property nodes with prefered value upon re-initialsation.
    2) put all the property nodes within a case struction in your while loop with a button control.
    With that, you can re-initialise all of them with a single click. With the same method, you will be able to wire them with fixed values upon entering a vi.
    Optional
    Configuration file can also be created using labVIEW.
    Value for each control/ indicator is stored in a file, which the values will be read back and write to each control/ indicator.
    have fun
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • How can I enlarge my tabs and keep them the way I set them? My page zooms in and out but my file, bookmarks, etc. tabs stay the same size.

    using the view tab, I select Zoom. Zoom in only increases appearance of web page. The tabs (File, Edit, View, History, Bookmarks, Tools and Help) all remain the same size! Way too small to read! This sucks and I don't LIKE IT!

    That sounds very handy. Nice going. A kind of backup would be to
    create a folder in the Bookmarks Manager, and keep a list of links there.
    Just one note. The sessionstore file shows the last windows / tabs that
    are open. Because the window with the 90 tabs was closed first, then the
    other, that is what caused your issue.
    Please edit the post title by adding '''==Solved==''' to it. Others may think
    you are asking for help, not offering a solution.

  • How to create the custom method and make it available to clients:

    Hello, Can any one help me with this problem ASAP??
    I am trying to work on an example of "Customizing the Query and Creating an Associated Custom Method"
    from http://helponline.oracle.com/jdeveloper/help/topics/jdeveloper/developing_mvc_applications/adf_pviewcustommethod.html?tp=true#method. To do that, the first task is to create the custom method and make it available to clients.
    Following instructions in the helponline documentation, I completed the three steps: (1) "Specify a custom query for the View Object definition for EmployeesView", (2) "Add the custom method to the application module Java class", and (3) "Make the method available to clients".
    The following is the error message I got to test the application module. Can anyone tell me what the message really means and what I should do. I am wondering if there is any mistakes in the document.
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT Employees.EMPLOYEE_ID, Employees.FIRST_NAME, Employees.LAST_NAME, Employees.EMAIL, Employees.PHONE_NUMBER, Employees.HIRE_DATE, Employees.JOB_ID, Employees.SALARY, Employees.COMMISSION_PCT, Employees.MANAGER_ID, Employees.DEPARTMENT_ID FROM EMPLOYEES Employees WHERE Employees.SALARY > :1 and Employees.DEPARTMENT_ID = :2
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) ORA-01008: not all variables bound

    You need to set values for the parameters in your query before you try to execute the query in the view object.
    So you need to call the setBindVars method before the query.

  • How to creat a "The command is currently not available" script alert?

    I'm working to construct a Configurator-like panel whose buttons play actions located on Photoshop's regular Actions panel.
    I'm using Eclipse and the EB3 plug-in and have made decent progress.  Here is a sample of code from the Photoshop.jsx file that is executed for one of the buttons.
    $._ext_CURVESLAYER={
        run : function() {   
            doAction('Curves', 'Adjustment-Layers');
    Very basic.  Just a doAction command to find the necessary action set and action and play it.
    When using Configurator and the necessary action is NOT present on Photoshop's regular Actions panel, a script alert is generated that says  "The command is currently not available"
    The panel I've created using EB3 doesn't provide this alert.  Nothing happens when I click a button on the EB3 panel whose action is missing from Photoshop's regular actions panel.  I'd like to be able to generate some type of message, like this script alert, if the action in the doAction command doesn't run as expected.
    It looks like Configurator may have used this code to generate this script alert base on the fact that it contains the words : "The command is currently not available"
    function ps_invoke_action(actionSet, actionName)
        var action = decode(actionName);
        var group = decode(actionSet);
    writelog("invoke action " + action + " " + group);
        ErrStrs = {};
    ErrStrs.USER_CANCELLED=localize("$$$/ScriptingSupport/Error/UserCancelled=User cancelled the operation");
        try
    app.doAction(action, group);
        catch(e)
            if (e.toString().indexOf(ErrStrs.USER_CANCELLED)!=-1) {;}
            else
    alert(localize("$$$/ScriptingSupport/Error/CommandNotAvailable=The command is currently not available"));
    I don't know Java at all, but I'm pretty sure this code doesn't work with the EB3 panels.  I tried copying it into the ext.js file and it had no effect.  (Most of this has been trial and error for me, and I thought that would be worth a try.)
    Can anyone help me with the code I need to use to generate the appropriate script alert if the doAction command doesn't run properly and where to put it in the various files required for an EB3-generated panel?
    Thanks!

    Hi,
    As per my knoledge, there is no automatted way to find out from which (Command line, Application and Script) the application is running. here
    i am suggesting some guidelines as specified below.
    1. Define standard arguments codes for the decrypt program like.
    1 - for Application.
    2 - for Script.
    3 - others.
    if(args[0] == 1)
    Decrypt PWD
    else if(args[0] == 2)
    DO Some thing
    else if(args[0] == 3)
    DO Some thing
    else
    -- Do not Decrypt --

  • How to delete formula from cells and keep the values in Excel VBA

    Hi,
    In my Excel I have 15 columns. In column F which has a formula (INDEX MATCH), it has contains "RECEIVED" and "INTRANSIT". I need to filter the column F for all "RECEIVED" and then remove the formula from cells and
    retain or keep the values that are already in the cells. something tricky and i'm not sure on how to work on this in Excel VBA.
    Below is my initla VBA code:
    I already have the codes on how to filter. kindly please help me on how to do this. thank you in advance.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    Debug.Print rng.Address
    rng.AutoFilter Field:=6, Criteria1:="RECEIVED"
    End With
    Application.creenUpdting = True
    End Sub

    Solved.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Dim rRec As Range
    Dim btField As Byte
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    btField = 6
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    With rng
    .AutoFilter Field:=btField, Criteria1:="RECEIVED"
    On Error Resume Next
    Set rRec = .SpecialCells(xlCellTypeVisible)
    On Error GoTo 0
    End With
    .AutoFilterMode = False
    If Not rRec Is Nothing Then
    With rRec
    .Columns(btField).Value = .Columns(6).Value
    End With
    End If
    End With
    Application.ScreenUpdating = True
    End Sub

  • HT4818 I have installed bootcamp that worked properly.  Then I have partitioned the OS X 10.8.2 and installed another OS X 10.8.2 and I have got two MAC boot options and Bootcamp disappeared from the Option menu. How can I boot Windows again and keep both

    I have installed bootcamp by the bootcamp assistant and worked properly.
     Then I have partitioned the OS X 10.8.2 and installed another Mountain Lion System and I have got two MAC boot options and Bootcamp disappeared from the Option menu. However, Bootcamp still remained in the Startup Disk in the System Preferences. When I tried to boot Bootcamp using the Startup Disk it did not boot and received a message that there is no bootable device. I have not lost any data and can read Bootcamp partition from both OS X systems. Please advise how can I boot Windows / Bootcamp again? Thank you. 

    Recommendation 1: Use a VM for this. It's essentially a giant C.F. to do this with native booting, and is potentially fragile.
    But if you're going to ignore that and do this anyway, realizing that it can break anytime in particular with OS upgrades, and that it's very difficult to impossible to resize the three volumes once you've installed the systems:
    1. create three partitions, setting each to be the size for OS X copy 1, copy 2, and Windows respectively. The Windows partition needs to be set to MS-DOS format (actually FAT32) which later in the Windows installer you'll reformat as NTFS. Do not use Boot Camp Assistant to resize/partition the disk, it simply won't work for this use case.
    2. install OS X copy 1
    3. install OS X copy 3
    4. Use gdisk (available at sourceforge) which is a command line only application, to create a new hybrid MBR adding only the last partition (Windows) to the hybrid MBR and setting it to be bootable. As a concequence you will not be able to see/share either OS X volume from within Windows. The Windows NTFS volume will be visible from within OS X.
    5. Install Windows to the only partition its installer should see (confirm size), you'll need to format it NTFS first, and I suggest using the fast format option if available.

  • How to map values between Contract and Purchase Order...

    Hi friends,
                        We are using SRM 5.0 (ECS). I am facing a problem with Purchase Order.
    . I am creating Contract locally through Live Auction. After that I am creating Purchase Order through Live Auction. So in Purchase Order Quantity, Net Price, Gross Price, and Long Text etc. not coming which is defined in Contract.  PO capturing the values from Live Auction, means no relation between the Contract and Purchase Order. After making Contract again I have to changes in the Purchase Order.
                So how to map the values from Contract to PO in SRM?  I want to map between contract and Purchase Order like R/3. At the time of creation of PO ( in R/3 )  we can adopt the Contract so all the relevant values comes from Contract to PO. In SRM how will I do?
    Please suggest me.

    When you create PO and a contract from a Live Auciton, they will not be mapped.
    While creating a PO (BBP_POC - Process Purchase Order); in the PO line item assign the contract and item reference. Only then they will be linked.
    Hope this helps.
    Regards
    Kathirvel

  • How to store values in varrays and how to retrieve it ?

    hi i am using d2k. i can store values in nested tables but i can't store it on varrays.
    declare
    TYPE NAMEARRAY IS table of varchar2(40) index by binary_integer;
    NAM NAMEARRAY;
    TYPE SACARRAY  IS table of varchar2(30) index by binary_integer;
    SAC SACARRAY;
    I    NUMBER(3):=1;
    BEGIN
      DECLARE CURSOR TEST IS
      SELECT NAME,PLACE FROM SCHOOL WHERE CLASS=10;
      BEGIN
      FOR VL IN TEST LOOP
      NAM(I):= VL.NAME;
    PLC(I):=VL.PLACE;
      I:=I+1;
      END LOOP;
      :DISP1:=NAM(1);
      :DISP2:=NAM(2);
      :DISP3:=NAM(3);
      :DISP4:=NAM(4);
      :DISP5:=PLC(1);
      :DISP6:=PLC(2);
      :DISP7:=PLC(3);
      :DISP8:=PLC(4);
      END;
    END;
    THIS ONE IS WORKING BUT I TRIED TO USE VARRAYS BUT NOT WORKING THIS I DONE.
    DECLARE
    TYPE NAMEARRAY IS  VARRAY(10) OF VARCHAR2(40);
    TYPE SACARRAY   IS VARRAY(10) OF VARCHAR2(30);
    I    NUMBER(3):=1;
    BEGIN
      DECLARE CURSOR TEST IS
      SELECT NAME,PLACE FROM SCHOOL WHERE class="10";
      BEGIN
      FOR VL IN TEST LOOP
      NAM(I):= VL.NAME;
    PLC(I):=VL.PLACE;
      I:=I+1;
      END LOOP;
      :DISP1:=NAM(1);
      :DISP2:=NAM(2);
      :DISP3:=NAM(3);
      :DISP4:=NAM(4);
      :DISP5:=PLC(1);
      :DISP6:=PLC(2);
       :DISP7:=PLC(3);
      :DISP8:=PLC(4);
      END;
    END;
    THE VARRAY METHOD IS NOT WORKING .CAN ANYONE CAN HELP ME TO FIX THIS.AND ALSO I WANT TO KNOW HOW TO DELETE ELEMENT FROM VARRAYS.THANKS IN ADVANCE.

    Try the below
    DECLARE
    TYPE namearray IS  VARRAY(10) OF VARCHAR2(40);
    TYPE sacarray  IS VARRAY(10) OF VARCHAR2(30);
    i NUMBER := 0;
    nam namearray := namearray();
    plc sacarray := sacarray();
    BEGIN
      DECLARE CURSOR test IS
      SELECT name,place FROM school WHERE class='10';
      BEGIN
      FOR vl IN test
       LOOP
        i:=i+1;
        nam.EXTEND;
        nam(i):= VL.name;
        plc.EXTEND;
        plc(i):=VL.place;
       END LOOP;
      :DISP1:=nam(1);
      :DISP2:=nam(2);
      :DISP3:=nam(3);
      :DISP4:=nam(4);
      :DISP5:=plc(1);
      :DISP6:=plc(2);
      :DISP7:=plc(3);
      :DISP8:=plc(4);
      END;
    END;
    You cant delete a single element from VARRAY like nested table. You can delete entire elements or else trim the VARRAY like below
    nam.DELETE; ---> It will delete entire element from VARRAY
    nam.TRIM(1); ---> It will trim one element from end of varray--> nam.TRIM(2) ---> Trim 2 elements

Maybe you are looking for

  • Is there a way to use the built in camera with msn

    I don't have any friends with a mac so hard to use Ichat. But with my pc i could use webcam and mic but with a mac they don't work at all is there a way to work. I have a Yahoo account and it works there the cam at least not mic. Or do all my friends

  • Downloading music from a cd to iphone4

    I would appreciate help in the above topic, also how do I import music from other sources to i tunes site thanks

  • Video pauses when streaming from ix2-dl from windows or WD Live TV

    When streaming music videos or any video from my Lenovo ix2-DL to my WD Live TV or PC the videos play but then pause then will pick up a bit further down. In Windows if I refresh my Explorer window it acts like the share isn't there then it reconnect

  • SAPBEXgetConnection doesn't return proper values when BEX is open via RRMX

    had to put a lot of interactivity in some workbook based on the user profile and going far beyond the simple authorisation objects. Following the advice of some specialists such as Peter Knoer, I used the following code to get the user connection det

  • Backup Radius on router

    I have the primary Radius server working just fine but when I stop the primary Radius server the backup radius server does not work, it fails over to the local password. I have included the config, does anybody have any idea why it won't fail over to