How do I add current value to existing values over a period of time?

Sorry guys, I'll apologize in advance since I think this problem may be very simple, but I had been mind blocked from going through hours of Labview Tutorial and trying it out.
Lets say I am working on a workout analyser, and everytime the z-axis fall below 0, I would count it as '1 count', I wanted to add up the total number of counts. Do I use an array to store the 'count'? I try using shift register and it only gives me the current count plus the previous, i.e. I get 2 everytime I do a count.
Solved!
Go to Solution.

If you just want a count, then a scalar value should be what you put into the shift register, not an array.
If the condition is true, add one to the value in the shift register and put it back in.  If the condition is false, then just put the current value in the shift register back in.
Attachments:
Example_VI_BD.png ‏10 KB

Similar Messages

  • DP macros, calculating average values over a period of time

    Hello
    I have a key figure row, for the future i want this key figure to contain the average of a different key figure row over the last year.
    How would you go about calculating the average value of a key figure row over a period of time and then assigning this value to another key figure?
    I've tried variatons of AVG() and SUM() & SUM_CALC a but none of them seem to get me anywhere, i may not understand completely how rows & values work so any tips would be helpful.
    Iin pseudo-logic: what i need to do is:
    Calculate the average value of a key figure row over a given period (the last year)
    Store this value somewhere, in regular programming it'd be a variable of some kind.
    Assign this value to another key figure row 18 months into the future.
    Regards
    Simon Pedersen

    <H5>Hi Simon,
    If you are a technical guy, you can create a BADI implementation for that macro and manipulate the matrix data like the way you want.
    the procedure to implement a BADI is
    1.SPRO --> SAP SCM - Implementation Guide --> Advanced Planning and Optimization --> Supply Chain Planning --> Demand Planning (DP) --> Business Add-Ins (BAdIs) --> MacroBuilder --> Additional Functions for Macros.
    create a new implementation by copying the class for the BADI defenition '/SAPAPO/ADVX' and write your own code in the method '/SAPAPO/IF_EX_ADVX~USER_EXIT_MACRO '. There is a sample code and proceedure explaining how to handle the data in the internal tables C_T_TAB and C_T_TAB_OLD. the calculations can be made with help of I_T_LINES, I_T_COLS which are rows and columns tables.
    find out the the row and columns of the grid to be read and do calculation and then put the result in the desired cell.
    Please let me know if you need further assistance.
    Regards,
    Srini.
    Award points for the helpful answers <H5>

  • How can i add two values under the same property?

    Hi all,
    How can i add two values under the same property name in a
    prop list? For example:
    [question1: "item1","item2", question2: "item3","item4"]
    To be more precise, i am creating a property list and I want
    whenever a two values have the same property name to be added int
    he list under the same property. For example:
    gMyList.AddProp (#""&question&"" & x,
    member("input").text)
    question is a variable that is updated fromt he user's input.
    Now, whenever somethign like this happens:
    question = "question1"
    member("input").text = "five"
    question = "question1"
    member("input").text = "six"
    I want to output list to be:
    [question1: "five","six"] and so on
    Any ideas?

    Maybe you could make each property a list (so you have a
    property list full
    of lists), and add multiple values to the list held in a
    particular
    property?
    Cheers
    Richard Smith

  • How do I add numeric values as text in XML??

    HI,
    So, I've developed a 3d carousel using this tutorial and the  XML, and customized the XML in Dreamweaver.
    http://www.gotoandlearn.com/play?id=33
    Now,  I've got the carousel set up exactly the way I would like, but the only  trouble, is how do I add numeric values as the text for the xml file???
    Here's an example to the working carousel and where text is loaded for each item on it.  (put your sound on mute if you don't want to hear the video)
    http://iongeo.com/collaboration_test_dev/video_arctic_imaging.html
    For  example, in my XML, if I would like the text to be "3d images", when I  export the FLA, only "d images" comes through because the numeric  values can't be added as the text for the tooltip.
    Does anyone  have any ideas?
    Here is an example of how the XML is loaded into  the .swf - the text loads great, but just not the numeric characters.
    The  same story can be said for special characters, I would like to know how  to add a "&" sign too.
    <icons>
    <icon  image="images/Subsalt_E_P_Partnerships.png" tooltip="3D Images"  content="Text Copy.">
    </icon>
    </icons>
    Any  help would be greatly appreciated.
    Thank you.

    Hi Randy,
    Thanks a lot for the reply.  Your post got me thinking that it's actually a flash problem, as the actual descriptor text shows 123,etc and "&".
    The trouble is that the icons are dynamically loaded from the XML to movie clips on the flash file.  I've asked the flash forum to see if they could take a look.
    Thanks again.
    Mike

  • How to new add characteristics value  c in report painter report.

    I  want add one how to new add characteristics value  in report painter report of FKi5. How can I add ?

    Dear,
    First you need to add that Field to your using library.When you add that
    field to your library ,you will automatically get that field into that
    selection list.
    Use T-code GR22 for change library and enter your library name and Table
    name and then select which field you want to add
    regards

  • How can i add the value inputted from the prompt box to the mysql database?

    Hey guyz help me pls with this problem... im only new to javascript and also to the opensource like(php and mysql). I tried to use a prompt box and store the value into the textbox. But now I want to know how to insert/add the value inputted from a prompt box directly into the database if it is possible.

    Java is not JavaScript, they've got almost nothing in common (apart from superficial syntax similarities and the first 4 letters of their names).
    If indeed your question is about JavaScript, then please find a JavaScript forum, as we can't help you here.

  • How does one add tables to an existing universe using COM designer SDK.

    Morning All
    How does one add tables to an existing universe using COM designer SDK. I have tried:
    objUniverse.Tables.Add (strTable_Name)
    but get "Cannot create Table" error.
    Any ideas?
    Thanks in advance.
    Anita

    Hi Anita,
    -Use the Add method to add classes and objects to an existing universe using a VB 6 application.
    Adding a Class
    Definition: Function Add(Name As String) As Class
    Syntax: NameOfClassesVariable.Add
    Adding an Object Instance
    Definition:  Function Add(Name As String, [ClassName As String]) As Object
    Syntax: NameOfObjectsVariable.Add(name, [class])
    - name is the name of the object.
    - class is the name of the class containing the object. This parameter should be used in cases where more than one objects exist with the same name.
    Sample Visual Basic 6 Code
    Dim DesApp As Designer.Application
    'MODIFY AND EXPORT CLASSES AND OBJECTS OF AN EXISTING UNIVERSE
    Sub modify_and_export_universe()
    Dim DesUnv As Designer.Universe
    Dim DesCls As Designer.Class
    Dim DesObj As Designer.Object
    Dim DesDBCol As Designer.DBColumn
    Dim DBColName As String
    Set DesApp = New Designer.Application
    'Login to designer
    Call DesApp.LogonDialog
    'Make sure to log on with your administrator profile
    'e.g : "hostname","username", "password","Enterprise"
    'Make Designer application visible
    DesApp.Visible = True
    'This line disable warning messages from Designer
    DesApp.Interactive = False
    'to Open  locally  the universe you want to modify
    'Set DesUnv = DesApp.Universes.Open("club_uni")
    'Use OpenFromEnterprise method (Universes Class) to import a universe from the repository and opens it
    Set DesUnv = DesApp.Universes.OpenFromEnterprise("Universes", "club_uni", False)
    'Add a valid connection which already exists
    DesUnv.Connection = "club"
    'open the universe
    'Call DesApp.Universes.Open("club_universe")
    'Add the table Account and refresh the view in the main window
    Set DesTab = DesUnv.DBTables.Item("Customer").Insert
    DesUnv.ArrangeTables
    'Add a class
    Set DesCls = DesUnv.Classes.Add("Class MyCustomer")
    'Looping through all the fields of the DB Table Account
    For Each DesDBCol In DesUnv.DBTables.Item("Customer").DBColumns
    'Store name of the column
        DBColName = DesDBCol.Name 
         'Add an object to the class
        Set DesObj = DesCls.Objects.Add("Obj " & DBColName)
         'Affect a field to the object
        DesObj.Select = "Customer" & "." & DBColName
    Next
    'Save the existing universe with the same name club_uni or you can change
    DesUnv.SaveAs "club_uni"
    MsgBox "Universe created and saved Class MyCustomer has been added!!"
    'Close the universe
    UnvFullName = DesUnv.FullName
    MsgBox "The UniverseFilePath is " & UnvFullName
    'Close the universe
    DesUnv.Close
    'This line disable warning messages from Designer
    DesApp.Interactive = False
    'Export the universe to the CMS DB (to the last universe folder)
    'Make sure you save the universe before exporting it
    Call DesApp.Universes.Export("Universes", UnvFullName)
    MsgBox "This document has been exported successfully !!"
    'Close designer
    DesApp.Quit
    Set DesApp = Nothing
    End Sub
    Hope this helps.
    Regards,
    Deepti Bajpai

  • HT201209 how do I add higher value "money" to my itunes account with out buying an iTunes gift card instead of buying 1 song at a time?

    how do I add higher value "money" to my itunes account with out buying an iTunes gift card instead of buying 1 song at a time?

    I know you can link your credit card to your Ipad, go to the app strore and go to the bottom and tap apple Id and sighn in then go to payment information and you can set up a credit card. Hope this helps

  • How do i add information to an existing document

    how do i add information to an existing document

    Not sure what you mean.  What application are you trying to use?

  • 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 get the current values of LINESIZE and WRAP in SQLplus ?

    How do I get the current values for the SQLplus environment variables
    e.g. LINESIZE, WRAP, PAGESIZE ?
    When I type
    SQL> show parameter LINESIZE
    nothing is displayed.
    Is there a command to show ALL existing current paramter values at once ?

    SQL> show linesize
    linesize 134
    SQL> show wrap
    wrap : regels zullen omgeslagen worden
    SQL> show pagesize
    pagesize 50000And you can issue a "show all" to see all settings at once.
    Regards,
    Rob.

  • How do I add an objectclass to existing LDAP server entry using an ldif file?

    I am trying to fix an LDAP server that has been operating with schema check off. I need to add an objectclass to the groups so that some attributes that have been added to the groups will be "legal." From the documentation, the changetype: modify will allow the changing/adding of attributes that are already a part of the schema objects that define the entry. It does not look like I can add an objectclass with the modify operation.
    If this is the case, then how do I add an objectclass to an existing entry? Using the GUI is not possible since the directory server in question is not being managed with an admin server. Please tell me that I do not have to delete the groups and import them again with an LDIF file that has the new objectclass added.
    Kent

    See this post:
    http://softwareforum.sun.com/servlet/ProcessRequest?RHIVEID=181&RPAGEID=135&HOID=50B500000008000000636B0000&USEARCHCONTEXT_CATEGORY_0=_21_%24_7_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_21_%24_7_&UCATEGORY_S=0

  • How can I add new value in a list box in a screen

    Hi All ,
        In transaction CRMD_BUS2000120 (CRM Server), I need to add one value to the list box. Already 4 values are coming. How can I add 1 more value.
      any suggestion is very appreciated.
    Thanks & Regards,
      Shekar.

    Hi,
    Check you have any exits to do that, if there are no exits then you can Copy the program and change the code.
    to add the extra value in list box, you just have to append the new line to the internal table which you are passing to VRM_SET_VALUES FM.
    some thing like this..
    wa_list-key  = sy-tabix.
    wa_list-text = itab1-vbeln.
    Append wa_list to It_list.
    v_name = 'P_VBELN'.
    call function 'VRM_SET_VALUES'
      exporting
        id                    = v_name
        values                = It_list
    EXCEPTIONS
       ID_ILLEGAL_NAME       = 1
       OTHERS                = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regads
    vijay

  • How to display the current value selected in DDLB of another screen

    hi Experts
    I need some info regarding the dropdownlist in BSP.
    I have two screens . One screen contains the table view which contains a set of records.Each record has two columns.
    Second screen contains 2 drop down list.
    When i select one record and then press the submit button in the first screen .Then i want that the selected value of the selected record will display in the DDLB of the second screen. And then i can again select the value from the drop down list.
    For example:
    1st screen:
    record 1.
    col 1     col 2
    record 2
    col 1     col 2
    2nd screen
    ddlb1...........
    ddlb2...........
    So when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen first time. Then i choose other value from the ddlbs.....
    My Question is how to do the following
    "when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen".
    please provide some suggestions...
    Thanks.

    Hi,
    You can use form with post method
    like
    <htmlb:form method = "post"
                      action = "page2.htm"
                      target = "coding" >
    <htmlb:dropdownListBox id             = "labelAlignment"
                                               selection      = "<%= me->labelAlignment %>"
                                               onClientSelect = "document.forms[0].submit();" >
                          <htmlb:listBoxItem key   = "LEFT"
                                             value = "LEFT" />
                          <htmlb:listBoxItem key   = "RIGHT"
                                             value = "RIGHT" />
                        </htmlb:dropdownListBox>
    So once you select col1 and col2 in your case its value is in page attribute say hold, this attributes needs to be defined in page2.htm also with auto checked. You can get the val selected in page1.htm
    If helpful rewards point.
    Regards,
    Albert

  • How can i pass a value over to a TitleWindow

    Okies as i read from the documentation given by adobe itself
    ... I have only seen examples on how to parse value over to the
    Main application from the title window but not the Main Application
    to the title window.
    What iam trying to do is i wanted to get a selected item from
    a tile list but i wanted to pass it to a swfLoader in a TitleWindow
    Component so that it knows which SWF(in my case ) to search for
    within the specific destination folder.
    What i have tried is to declare a variable to store the
    selectedItem
    example would be ..
    main_application
    public var selectedItem:String =
    "{tileList.selectedItem.Image}";
    titlewindow
    source=
    "assets/data_games/{Application.application.selectedItem}.swf"
    but it seems to be a wrong way to call it ..
    could anyone help me out on how to solve my following
    problems?

    First this forum is intended for questions about Flex
    Builder. Flex language questions should be posted in the Flex
    General Discussion forum.
    That is generally right, but I would build the swf source
    string in a variable first so you can debug it. Do that in a
    handler function on the creationComplete event of the TitleWindow
    Tracy

Maybe you are looking for

  • Why does Flashplayer for Firefox create 1000's of FAP####.tmp files and never cleans then up?

    Version Info FlashPlayer Plugin version: 11.9.900.117 (and many version before) Firefox version                   : 24.0 (and many versions before) Windows Version               : Windows 7-SP1 Directory of Files               :  C:\Windows\Temp Deta

  • Bluetooth connection to car.

    I am having trouble connecting my curve 9300 to the car built in hands free. My previous Pearl connected as soon as I entered the car. I have checked the set up and all seems OK but the phone wont connect. The car is a Ford Mondeo with built in sat

  • Differences in Depreciation key table structure between SAP 4.5b and mySAP

    Depreciation keys in SAP 4.5b were stored in a different table structure to depreciation keys stored in mySAP ERP 2005. Deprecation Keys that existed before the SAP upgrade still exist in the old set of tables; these have a status of “Migrated” in SA

  • MAC C++ issues on Snow leopard

    i am developing cross platform C++(Qt4.7.3 + VTK5.9) application using CMAKE (GCC 4.2, XCode 3.2.5)on Snowleopard IMAC oSX 10.6. 4. and i am running into several issues. 1: Application is crashing on MAC several times. the same application is working

  • Updating templates problem

    I am finding that when I change something on a template, and it asks me if I want to update all files that use this template, although I am clicking yes and Dreamweaver reports that it's updated all the files that use the template, the "done" button