Math operations on history chart

Hi everyone, I'd like to be able to do some math processing to chart history in that way:
1) visualizing continuous data from serial port on a multi plot chart  ---> done
2) at a certain point be able to do some basic math operation on all the chart plots, say for example plot1 multiply by 2, plot 2 multiply by 1.5 ecc.. and visualize those operations on all the history collected till that moment on the same chart replacing raw data, and maybe return to visualize all the raw data collected, programmatically.
Thanx

Hi ghrsdr,
The best way to do it is to maintain a data structure in memory containing a portion of the acquired data (even all). When you need to do some operations on the data you could use this data structure to retrieve and modify your data, even creating a new data structure to maintain the original data. If the data set is large you may consider to stream data to and from your hard disk. The chart should be used only for data visualization purposes, not as a data structure to store the acquired data.
I suggest you to read the following white papers on the management of large data sets in LabVIEW.
Managing Large Data Sets in LabVIEW
http://www.ni.com/white-paper/3625/en
Memory Management for Large Data Sets
http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/memory_management_for_large_data_sets/
I hope I have given you some useful suggestion for your project.
Best regards,
Enrico

Similar Messages

  • Math Operations on LV for Palm

    I am trying to write a program for a Treo 680 running PalmOS 5.4 (Garnet) using LV for PDA 8.0, and I observe some strange behavior in math operations. The test that I did was to calculate B = log10(A). Both A and B are defined as DBL. The B field is programmed to show 16 decimal places. When I run this program on the PC, I get the following results:
    log10(10) = 1.0000000000000000
    log10(50) = 1.6989700043360187
    log10(100)= 2.0000000000000000
    When I run the same program on the Treo (or on Palm OS Garnet Simulator - same results), I get
    log10(10) = 1.0000000000
    log10(50) = 1.2694732747
    log10(100)= 2.0000000000
    A couple more interesting results:
    log10(72) = 1.4278357668
    log10(73) = 1.0043294009
    Two questions:
    1) Why do the results on Palm have only 10 decimal places?
    2) Why are non-integer results so far from the correct values?
    A few notes:
    1) This is not a question of DBL vs. SGL: log10(50) in SGL arithmetic is 1.6989699602127075
    on the PC - the difference starts only in the 7th decimal place.
    2) I have MathLib.prc installed on the Treo (and on the simulator).
    3) The Palm calculator works correctly: e.g. log10(50) = 1.698970004336
    TIA,
    Sergey

    Cepera wrote:
    I mean, how can you have a bug in such a fundamental operation as log(a)?
    As mentioned, the PDA module converts your code to C, which is an error prone process.
    Couple that with the fact that the PDA module has a relatively small market (and the Palm version an even smaller one, as evidenced by its scrubbing), and you can see how bugs like this can slip through the cracks. As you mentioned, the error does not occur for all values of a.
    Try to take over the world!

  • Network History chart wrong

    Network history chart indicates that several computers are currently connected when they are turned off or not anywhere near the house.  Network map however, is correct. Any ideas?

    Hi, the chart should show on the bar when the computers were connected to your network via the blue sections of the chart.
    I know, the chart is confusing and needs a bit of work. 
    My Cisco Network Magic Configuration:
    Router: D-Link WBR-2310 A1 FW:1.04, connected to Comcast High Speed Internet
    Desktop, iMac: NM is on the Windows Partition, using Boot camp to access Windows, Windows 7 Pro 32-bit RTM, Broadcom Wireless N Card, McAfee Personal Firewall 2009,
    Mac Partition of the iMac is using Mac OS X 10.6.1 Snow Leopard
    Laptop: Windows XP Pro SP3, Intel PRO/Wireless 2200BG, McAfee Personal Firewall 2008
    Please note that though I am a beta tester for Network Magic, I am not a employee of Linksys/Cisco and am volunteering my time here to help other NM users.

  • Deprecated math operator  ^ ?

    I was using Cold Fusion MX7, and now I'm on CF8.
    This week someone told me that I had a problem with one of my
    calculation, it use to be giving the good result but now it is not
    giving good result. The only thing I can see is that the math
    operator ^ is deprecated in CF8, is there something that replace
    it???

    > the math operator ^ is deprecated in CF8,
    Cite?
    It certainly doesn't say anything like that in the docs:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/Expressions_03.html
    {quote}
    ^
    Exponentiation: Return the result of a number raised to a
    power (exponent).
    Use the caret character (^) to separate the number from the
    power; for
    example, 2^3 is 8. Real and negative numbers are allowed for
    both the base
    and the exponent. However, any expression that equates to an
    imaginary
    number, such -1^.5 results in the string "-1.#IND. ColdFusion
    does not
    support imaginary or complex numbers.
    {quote}
    But anyway, if something is deprecated, it still works same
    as it ever did,
    it's simply flagged for obsolescence. So even if the ^
    operator was
    deprecated, there'd be no difference in how it worked before
    and after
    deprecation.
    CF seldom deprecates things, and even when deprecated, things
    are seldom
    actually obsoleted. A good example is the parameterExists()
    function: it's
    be deprecated since (at least) CF5. It's still there and
    functional in CF8
    though.
    > <cfset mtp = #rem# * 100 * ( (1 - ((1+
    (#tme#/100))^-#duree#) ) ) / #tme#>
    Well you don't need those pound signs in there, but having
    them just makes
    your code look untidy, it doesn't actually impact anything.
    What kind of differences in results are you seeing?
    Adam

  • (Error in documentation?) Math operator precedence problem

    Hello,
    I apologize in advance, while I do know programming (I'm a PHP and Perl programmer) I'm fairly new to Java so this may well be a silly question, but that's why I am here. I hope you'll show me where my error is so I can finally set this to rest before it drives me mad :)
    (Also, I hope I'm posting this in the right forum?)
    So, I am taking a Java class, and the question in the homework related to operand precendence. When dealing with multiplication, division and addition, things were fine, the documentation is clear and it also makes sense math-wise (multiplication comes before addition, etc etc).
    However, we got this exercise to solve:
    If u=2, v=3, w=5, x=7 and y=11, find the value assuming int variables:
    u++ / v+u++ *w
    Now, according to the operator precedence table (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html) the unary operator u++ comes first, before multiplication, division and addition.
    This would mean I could rewrite the exercise as:
    ((u+1)/v) + ((u+1)*w) = (3/3) + (4*5) = 1+20 = 21
    However, if I run this in Java, the result I get is 15.
    I tried breaking up the result for the two values in the Java code, so I could see where the problem is with my calculation.
    For
    System.out.println(u++ /v);
    I get 0
    For
    System.out.println("u++ *w");
    I get 15
    My professor suggested I attempt to change the values from int to float, so I can see if the division came out to be something illogical. I did so, and now I get:
    For
    System.out.println(u++ /v);
    I get 0.66667
    For
    System.out.println("u++ *w");
    I get 15.0000
    Which means that for the first operation (the division) the division happens on 2/3 (which is 0.6667) and only afterwards the u value is increased. That is, the u++ operation is done after the division, not before. The same happens with the multiplication; when that is carried out, the value of u is now 3 (after it was raised by one in the previous operation) and the first to be carried out is the multiplication (3*5=15) and only then the u++.
    That is entirely against the documentation.
    This is the script I wrote to test the issue:
    public class MathTest {
         public static void main (String [] args) {
              float u=2, v=3, w=5, x=7, y=11;
              System.out.println("Initial value for 'u': " + u);
              float tmp1 = u++ /v;
              System.out.println("u++ /v = " + tmp1);
              System.out.println("First ++ value for 'u': " + u);
              float tmp2 = u++ *w;
              System.out.println("u++ *w= " + tmp2);
              System.out.println("Second ++ value for 'u': " + u);
              System.out.println(tmp1+tmp2);
    The output:
    Initial value for 'u': 2.0
    u++ /v = 1.0
    First ++ value for 'u': 3.0
    u++ *w= 20.0
    Second ++ value for 'u': 4.0
    21.0
    Clearly, the ++ operation is done after the division and after the multiplication.
    Am I missing something here? Is the documentation wrong, or have I missed something obvious? This is driving me crazy!
    Thanks in advance,
    Mori

    >
    The fact that u++ is evaluated but in the calculation itself the "previously stored" value of u is used is completely confusing.
    >
    Yes it can be confusing - and no one is claiming otherwise. Here are some more thread links from other users about the same issue.
    Re: Code Behavior is different in C and Java.
    Re: diffcult to understand expression computaion having operator such as i++
    Operator Precedence for Increment Operator
    >
    So, when they explain that ++ has a higher precedence, the natural thing to consider is that you "do that first" and then do the rest.
    >
    And, as you have discovered, that would be wrong and, to a large degree, is the nut of the issue.
    What you just said illustrates the difference between 'precedence' and 'evaluation order'. Precedence determines which operators are evaluated first. Evaluation order determines the order that the 'operands' of those operators are evaluated. Those are two different, but related, things.
    See Chapter 15 Expressions
    >
    This chapter specifies the meanings of expressions and the rules for their evaluation.
    >
    Sections in the chapter specify the requirements - note the word 'guarantees' in the quoted text - see 15.7.1
    Also read carefully section 15.7.2
    >
    15.7. Evaluation Order
    The Java programming language guarantees that the operands of operators appear to be evaluated in a specific evaluation order, namely, from left to right.
    15.7.1. Evaluate Left-Hand Operand First
    The left-hand operand of a binary operator appears to be fully evaluated before any part of the right-hand operand is evaluated.
    If the operator is a compound-assignment operator (§15.26.2), then evaluation of
    the left-hand operand includes both remembering the variable that the left-hand
    operand denotes and fetching and saving that variable's value for use in the implied
    binary operation.
    15.7.2. Evaluate Operands before Operation
    The Java programming language guarantees that every operand of an operator (except the conditional operators &&, ||, and ? appears to be fully evaluated before any part of the operation itself is performed.
    15.7.3. Evaluation Respects Parentheses and Precedence
    The Java programming language respects the order of evaluation indicated explicitly by parentheses and implicitly by operator precedence.
    >
    So when there are multiple operators in an expression 'precedence' determines which is evaluated first. And, the chart in your link shows 'postfix' is at the top of the list.
    But, as the quote from the java language spec shows, the result of 'postfix' is the ORIGINAL value before incrementation. If it makes it easier for then consider that this 'original' value is saved on the stack or a temp variable for use in the calculation for that operand.
    Then the evalution order determines how the calculation proceeds.
    It may help to look at a different, simpler, but still confusing example. What should the value of 'test' be in this example?
    i = 0;
    test = i++; The value of 'test' will be zero. The value of i++ is the 'original' value before incrementing and that 'original' value is assigned to 'test'.
    At the risk of further confusion here are the actual JVM instructions executed for your example. I just used
    javap -c -l Test1to disassemble this. I manually added the actual source code so you can try to follow this
            int u = 2;
       4:iconst_2       
       5:istore  5
            int v = 3;
       7:iconst_3       
       8:istore          6
            int w = 5;
      10:iconst_5       
      11:istore          7
            int z;
            z = z = u++ / v + u++ * w;
       13:  iload   5
       15:  iinc    5, 1
       18:  iload   6
       20:  idiv
       21:  iload   5
       23:  iinc    5, 1
       26:  iload   7
       28:  imul
       29:  iadd
       30:  dup
       31:  istore  8
       33:  istore  8The Java Virtual Machine Specification has all of the JVM instructions and what they do.
    http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf
    Your assignment to z and formula starts with line 13: above
    13: iload 5 - 'Load int from local variable' page 466
    15: iinc 5, 1 - 'Increment local variable by constant' page 465
    18: iload 6 - another load
    20: idiv - do the division page
    21: iload 5 - load variable 5 again
    23: iinc 5, 1 - inc variable 5 again
    26: iload 7 - load variable 7
    28: imul - do the multiply
    29: iadd - do the addition
    30: dup - duplicate the top stack value and put it on the stack
    31: istore 8 - store the duplicated top stack value
    33: istore 8 - store the original top stack value
    Note the description of 'iload'
    >
    The value of the local variable at index
    is pushed onto the operand stack.
    >
    IMPORTANT - now note the description of 'iinc'
    >
    The value const is first sign-extended to an int, and then
    the local variable at index is incremented by that amount.
    >
    The 'iload' loads the ORIGINAL value of the variable and saves it on the stack.
    Then the 'iinc' increments the VARIABLE value - it DOES NOT increment the ORIGINAL value which is now on the stack.
    Now note the description of 'idiv'
    >
    The values are popped
    from the operand stack. The int result is the value of the Java
    programming language expression value1 / value2. The result is
    pushed onto the operand stack.
    >
    The two values on the stack include the ORIGINAL value of the variable - not the incremented value.
    The above three instructions explain the result you are seeing. For postfix the value is loaded onto the stack and then the variable itself (not the loaded original value) is incremented.
    Then you can see what this line does
      21:  iload   5 - load variable 5 againIt loads the variable again. This IS the incremented value. It was incremented by the 'iinc' on line 15 that I discussed above.
    Sorry to get so detailed but this question seems to come up a lot and maybe now you have enough information and doc links to explore this to any level of detail that you want.

  • PDF Version History Chart Listing Features Of Each Revision?

    Hello,
    Would anyone be aware of a chart style format for the history of the Portable Document Format which would list each PDF version along a timeline from its inception to the current version, with the newly added features of each revision outlined accordingly?
    Thanks in advance for any assistance with this inquiry.
    Robert Cataldo
    Project & Technical Prepress Manager
    Production Technology Dept.
    Community Newspaper Company
    GateHouse Media New England
    Web: GateHouseMedia.com
    Email: [email protected]
    Phone: 781.433.6777
    Cell: 781.760.7032
    Nextel ID # 16

    Thanks once again Leonard, I was able to cull each of the 'new feature' sections from the PDF Reference books, versions 1.3-1.7, and was able to do the same with 1.2, after locating that book here:
    http://www.pdf-tools.com/asp/pdf-specifications.asp
    The 'Adobe PDF Technology Center' 'PDF Reference' page doesn't maintain books for versions earlier than 1.3.
    Finally, should I be looking for a reference book which outlines features for versions earlier than 1.1 (the 1.2 guide listed both 1.1 and 1.2), and if so, would you be aware as to where I might find these materials?
    Thanks so much for your guidance!
    Robert

  • Operating a Waveform Chart Backwards and Forwards

    I want to acquire data to a waveform chart. I want to be able to reverse the direction of my acquisition so as to overwrite the data that I have just acquired when needed and then go back forward - and so on. Does anybody know how I might be able to accomplish this or know of an example that may already do this? Thanks

    You can't do that with a waveform chart but you can do it with a waveform graph. See attached example.
    Attachments:
    temp.vi ‏69 KB

  • Simple math operation - Help needed

    Hi, i have a simple mathematical operation to do, related to
    a shooping cart, which i want to keep simple.
    I have a input text box named QT1, where customers indicate
    quantity
    I have a dymanic text box, named ST1, where i want the value
    of QT1 to be multiplied by 10$ (hence 10)
    on the release of the button. I have a NaN answer. Here is
    the code.
    on (release) {
    var qt1:Number;
    st1 = qt1 * 10;
    And then, a grand total button will add ST1 + ST2 + ST3, with
    GT the name of the grand total dymamic box:
    on (release) {
    gt = st1 + st2 + st3;
    The second part works, but the first one, with QT1 is giving
    me a Nan (not a number) answer.
    Any help appreciated.

    Problem solved. That cary Auto-kern thing....

  • Math operator for pl/sql

    Does anyone know wich operator may I use for calculating the module like in the following expression?
    SELECT * FROM sale WHERE Customer_Id <operator> 2 = 0
    Thanks!

    Assuming you mean the modulo,
    WHERE mod(customer_id,2) = 0Justin

  • Webkit JS Core Bug in Math operation

    https://bugs.webkit.org/show_bug.cgi?id=40367
    When will Apple push out official Safari updates to fix this bug in Safari 4.1 and Safari 5.

    HI,
    Hard to say since the Apple Discussions TOU forbids discussions regarding when an update might be available.
    Help and Terms of Use
    Carolyn

  • Math operations on array in TestStand

    Hi.
    I have 2 questions
    1. Is it possible to multiply an array by a number in TestStand?
    I know there are some numeric functions available in TestStand but I don't know if like LabVIEW I can multiple ( subtract/add/divide...) all the elements of an array by a number
    2. Let's say I want to pass a 1D array of numbers ( size 10) to a code module but I would like to just pass the first 5 elements . How can I do it in TestStand ? I have checked the array function but I couldn't find something like Array Subset?
    Could you please help me with these question

    In TS 2012 and later they added some new array functions such as Min, Max, Split, Sort, etc...  They also added the ability to do Locals.MyArray[4..8].  Which will give you elements 4 through 8 of the 0 indexed array.
    As for the adding to each number I don't think that capability exists.  If it did it would be something like Locals.MyArray + 100.  It defnitely doesn't work in TS 2010.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to extract data from Chart History?

    Dear all, I have read a lot of posts, but still don't understand how to extract data from Chart history.
    Suppose you acquired 1024 points of data every time, then use "build array" to build an array, then send to intensity chart to show, then save the history into a .txt file,  but how to extact data from the file?
    How Labview store the data in the 2D history buffer?
    Anybody has any examples?

    The simplest would be to save the 2D array as a spreadsheet file, the read it back the same way.
    Maybe the attached simple example can give you some ideas (LabVIEW 7.1). Just run it. At any time, press "write to file". At any later time, you can read the save data into the second history chart.
    If you are worried about performance, it might be better to use binary files, but it will be a little more complicated. See how far you get.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IntensityChartHistorySave.vi ‏79 KB

  • History tables and charts empty

    Any suggestions for finding the root of a display issue on my phone?
    Oddly I find that the history of events table in the Alarm.com app and the history chart in the PeoplePower monitoring application show no data when there should be. I have another iPhone 4 and an iPad on the same iTunes account. When logged into the same app the data display is normal. All apps and Joe versions the same. I've logged out and back into the apps. Deleted and reinstalled. Still no history shows in those two apps. So I restored the OS and setup as a new account then installed just those 2 apps. Data displayed normally. Restoring my backup brought the non-display issue back. At least until os5 and selective data backup and restore it would be exceedingly painful to setup as a new device and bring all the apps data back. On a mac I'd be looking for corrupted prefs. Is it possible to do that with a backup set before restoring the backup?

    Resolved with Resetting Settings (but not content)

  • Math Addition Operator Question

    Hi there,
    I'm trying to write a very simple math equation:
    var gal_width = 100;
    var m_box_pos = 2000;
    var total = (gal_width+m_box_pos);
    When I display this in a text element, the numbers are shown together rather than being added together
    (eg: 1002000)
    I get the feeling Edge is interpreting the + as a string operator rather than a math operator.
    Replacing the + with a - (as a test), the 2 numbers are being subtracted.
    Multiplying the numbers with the * operator also works as it should.
    I've tried many configerations, escaping the operator with no luck.
    Any ideas of how to get addition to work?
    Thanks

    Hi 29sketc.
    console.log( sym.$("text_111").text());
    // logs : 111
    console.log(typeof sym.$("text_111").text());
    // logs : string
    var number_222 = 222;
    console.log(typeof number_222);
    // logs : number
    console.log( sym.$("text_111").text() +number_222);
    // logs : 111222
    text() has produced a String so + is interpreted here as string concatenation.
    var number_111 = 111;
    console.log(typeof number_111);
    // logs : number
    console.log(number_111 +number_222);
    // logs : 333
    When you have two Number variables + is interpreted  as addition.
    Gil

  • How to integrate operating charts of account to country and group coa

    Hi Sap gurus,
    How to integrate operating chart of account to country and group chart of account
    Regards,
    Rajesh

    First create the country chart in OB13 and assign the same to OB62.
    Then for each operational chart of account, enter the country chart of account in FS00 and this will be captured in field Alternate account number.
    The relationship between operational to country chart of a/c is 1:1.

Maybe you are looking for

  • Text & Graphic from Print Module

    I bought Lightroom to help grow my Events business, we print on the night, we have an Awards night to shoot soon. We would like to have a graphic (Logo) and Text naming the type of Award. Would somebody please help and explain how to achieve this. As

  • Boot Camp update hanging on iSight

    Hi, I've been trying to install Boot Camp 2.1, and when done via Apple Update, it just hangs forever in the middle of installation. Downloading the patch file itself and trying to install that, it hangs at the point where it tries to install drivers

  • System Landscape on XI or SRM ?

    Hello to all, Actually I have to configure the system landscape for several systems, but I do not know which are the best practices that I must follow to form it. I have two servers one of the XI and other one of SRM 5.0, additional I have in another

  • How to align the output?

    Hi all, The following code snippet: produced output like this: Material Number     Created By     Changed By     Material Type     Material Status     Material description      000000000000000001     FRE8OT     MES2KOR     FERT          Test      000

  • ESys 3920 paper jam

    I keep getting "Paper jam" message but there is no jam and test card prints fine. Printer will not print from laptop. There is a link. Have gone thru all HP suggestions. Can anyone help?