How to use math formula on waveforms

Hi all,
I'm trying to create a program that can use math scipts, formulas etc on waveforms. I've done it for one signal, but I don't know how to change work on 2 or more signals;/ Let's see exampe: one channel is voltage, the second is current and I want to see both of them and as a third signal power so I'm writting formula ch3=ch1*ch2. Another example: I've signal which represents speed of starting motor (500 points) but I need only few points so the formula will be: ch1(20:120) and I have points from 20 to 120. Is it possible to do it? I can't do it using blocks cause I don't know which signal means what... so ch1 can be voltage, ch2 speed, ch3 current ch4-torqu etc. I know that I can cut a part of signal by subarray or subwaveform but it must be done by formula to use (for example) something like that:
ch1(1:20)=0 <- replace all point from 1 to 20 of ch1 by 0
ch2(50)=40 <-replace point 50 of ch2 by 40
ch3=ch1*2 + ch2 <- do this operation but first do both above this one.
Is it possible? or it's to complicated?
I attached my vi which is working for one selected signal (I don't want to select it... but I don't know how to do it;/) and signal that I'm using to check how it's work
Thanks
Mike
Attachments:
Archive.zip ‏134 KB
math formula.vi ‏152 KB

I've upgraded it a little and it works with 2 signals but very sensible;/ formula must have this construction: c3= ... , both of signals must be switched on, there's no way to use part of signal (e.g.c1(21:54) ) and I can't use 2 rows (something like this: c3=c1*c2; c3=c1 doesn't work);/ additionally I wanted to have possibility to use all of signals as input and all of them as output
Attachments:
math formula.vi ‏183 KB

Similar Messages

  • How can i add formula to waveform data type?

    I want to interpolate my acquired data in terms of voltage to temperature. For this i need to use polynomial equation, but i am not able to directly attach formula node to the waveform data type. I want to know how can i add formula node to waveform data, and then also have it real time.

    One additional thought that may be helpful. Once you get the Y component of the waveform graph you are going to attempt to wire this into a formula node. You can do one of two things with that array. Put a for loop around the formula node and index the array into and out of the for loop. This allows you to do scalar math on the data. It is also possible to index and array in a formula node. The following KnoledgeBase demonstrates how to do this: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/9d72b6069346942386256a0d00604ed4?OpenDocument

  • How to use a Formula Column in the main query?

    Hi All,
    I've tried to use a formula columns defined in some query in the condition of that query like this:
    where (:cf_ex - :cf_ex2) >= 5
    but when I run the report no data returned! Why? and how to use it the condition of the query?
    Note: I'm using Forms 6i

    where (:cf_ex - :cf_ex2) >= 5You cannot do that. Formula columns are not part of the select statement (which runs in the database), but are processed in the report.
    When you created this query, my guess is that you got the message "Note: the query Q1 has created the bind parameter(s) cf_ex, cf_ex2". Check these User Parameters in your data model. So, you are actually referencing user parameters in the query, not formula columns.
    I made a computations and things using PL/SQL that can't be done in the select statement in the data model!If it's pl/sql you can probably use that in your query. Create some database functions for cf_ex and cf_ex2 and use these in your query.

  • Cumulative Key Figure (Running Total) - how to use in formula?

    We have a scenario where I need to use the cumulative value of a Key Figure in a subsequent formula. The “Cumulated” property setting at the Key Figure level in the query is a “Displayed Data Only” setting, however, so the cumulated values are not available for use in a formula  The individual values are used by BW as opposed to the cumulative values that are displayed in the column.
    I’ve tried using the “Cumulated” property at the characteristic level. I am then able to use the displayed cumulative values in a formula. However, I also need to display the individual (not cumulated) Key Figure values in a column. These individual values are no longer available for display if the “Cumulated” property is set at the Characteristic level.
    I thought that the “Define Cells” functionality could possible be used, but there is only one Structure in the query, so the “Define Cells” functionality is unavailable. I could not think of a way to use a second structure in the rows, as the rows need to be dynamic (two characteristics, populated based on user input variables).
    It may be possible to accomplish this requirement by adding a column using VBA in the SAPBEXonRefresh sub, but use of VBA is not a preferred option, as the query may be run in either the Excel Analyzer or the Web Analyzer.
    The infoprovider does not contain a Key Figure field for Cumulative Volumes.
    The scenario details:
    Rows (Characteristics):
    A: Plant (values based on user input variable)
    B: Calendar day (values based on user input date variables for start & end dates)
    So there is one row for each day within each plant.
    Columns (Key Figures):
    A: Cumulative Volume at Start of Period (uses user input date variable for start date, and “Constant Value” property. Hidden column.)
    B: Daily Volume (for each day in the period defined by the user input variables for start and end dates)
    C: Cumulative Volume at End of Each Day (formula, meant to be equal to the sum of the Cumulative Volume at start of period plus the total so far of the Daily volumes. In other words, equal to the sum of Column A plus the running total of Column B).
    Does anyone out there have any more ideas on how to accomplish the required Cumulative Volume computation?

    Thanks for your reply Jurgen.
    I've created a Global Calculated Key Figure (CKF), and have looked at and tried a number of settings in the Properties of this new CKF.
    I have not yet been able to make this work for me.
    The "Cumulated" property for a Global CKF is also a display-only property. The displayed running total is not used in any formula containing this CKF, only the individual values are used in the formula.
    If I select the 'Enhance' option, where exception aggregation can be done as I think you suggested, I do not see a 'cumulated' option. If I select the 'Summation' option for 'Exception Aggregation', then the 'Reference Characteristic' pull-down is not available.
    Is there a different 'Exception Aggregation' option I should be using for running totals at the calendar day level?
    Or am I unclear on the concept of your suggestion?
    Perhaps you're on a later version of BW that has more Exception Aggregation options? (We're on BW3.5)

  • How to use math symbols in Pages

    How can I find math symbols in Pages?
    Do I need additional Software or is there a possibility as in Microsoft Word?

    You can find some math symbols in Pages if you go to Special Characters. Open Pages, go to Edit menu (on the menu bar) > Special Characters, and choose math symbols in the sidebar, so you will be able to add a symbol double-clicking the symbol.
    However, it may not include all symbols. In this case, you will have to use other third-party applications

  • How to use example formulas in a customized spreadsheet

    I like the set up and formulas used in the example spreadsheet for Checking in Numbers 09. However, I would like to remove the data that is there and replace with my own data without losing the formulas used. How can I do that?
    Also, I would like to add a column for "Withdrawals" and change the name of "Amount" to "Deposit" and have the "Balance" column to continue reflecting the correct balance. I do know how to add the extra column and how to change the name of "Amount"; what I do not know is how to get "Balance" to reflect the correct amount. How can I do it?
    Thanks for your help and suggestions.
    Vernon

    You can delete all the data in columns A, B, and C. Just don't delete any cells that have formulas in them (column F) and don't delete the pop-ups in column D. You can also rename "Amount" to "Deposit" without affecting anything.
    If you add a column for withdrawals, you will have to modify the formula in the balance column. Here is one way to do it:
    Add a column to the left of Deposit (currently called Amount), this new "withdrawal" column will become column E and Deposit will become column F.
    Copy the formula below and paste it into cells G3 through G14 (all of the cells from G3 to the bottom of the table):
    =$G$1-SUM(OFFSET(Balance 101,3-ROW(),-2,ROW()-2))+SUM(OFFSET(Balance 101,3-ROW(),-1,ROW()-2))
    When you enter amounts in the Deposit or Withdrawal column enter positive amounts, not negative ones like those currently in the table.
    What I don't know is how this will work with a downloaded file from your bank. It may not work with the additional column and with all positive numbers.
    EDIT: If you already read this post, I have since removed the stuff about modifying the popup to include a "deposit" category.. It already has one.
    Message was edited by: Badunit

  • How to use Column Formula in Answers? Help needed

    Hi all, I have a report requirement.
    I have a prompt.
    I need the column to be displayed based on a prompt value.
    For instance,
    Lets Say I have a report with two columns.
    Customer_name , amount
    wheere customer_name is a column from presentation catalog and Amount is the column I need to calculate based on prompt value.
    If prompt value = 'X' , Then, amount is calculated as: column1+column2
    If Prompt value = 'Y' I need amount = column3
    Where column 1, column2, column 3 are presentation columns.
    'Amount' is the column I need to show in the report.
    I believe this can be done in column formula in asnwers.but donot know How to do it.
    Can you help me in implementing this Please.
    Thanks a lot in advance for your time and help.

    Hi,
    First go through guided navigation concept.
    Follow these steps -
    1) Create two reports,one with Customer_name,amount(column1+column2) call it report1 and other with Customer_name , amount(column3) call it report2
    2) Now create one prompt with sql result and write sql query as below -
    SELECT CASE WHEN 1=0 THEN 'HELLO' ELSE 'X' END FROM SA.TABLE
    UNION ALL
    SELECT CASE WHEN 1=0 THEN 'WORLD' ELSE 'Y' END FROM SA.TABLE
    Use presentation variable.
    (If you are already having x and y in some column then no need to use sql result in prompt)
    3) Now edit dashboard and place two sections and place one report per one section(section1-report1)
    4) Now create one intermediate report with some dummy column and in fx place below code -
    CASE WHEN 1=0 THEN 'HI' ELSE 'X' END
    Apply filter on this column as equal to presentation variable.
    5) In section1 go to properties->guided navigation->select intermediate report that you created.
    Show this section if request returns rows.
    6) In section2 go to properties->guided navigation->select intermediate report that you created.
    Show this section if request returns nothing.
    Try to understand guided navigation functionality,that helps you lot.
    Hope this helps.
    Regards,
    Srikanth

  • How to use a formula for dynamic New Page After?

    There is a formula for dynamic New Page After.
    How do I get value of formula?
    I am using RAS and the ReportClientDocument.

    There is a section object.  Off that there is a format property that is of type sectionformat.  From there there is a ConditionFormulas property which I believe is a collection of all the formulas you can set for a section.

  • How to use Math.random() to generate an integer within a range

    How can I generate a random integer from 1 to 10 using the Math.random() method?
    Thanks.

    Then why do i get this compile-time error?
    found   : double
    required: int
                        matrix[i][j] = (int) 11 * Math.random();
    matrix is an array of integers:
    String colNumStr = JOptionPane.showInputDialog("Please specify the number of rows");
        String rowNumStr = JOptionPane.showInputDialog("Please specify the number of columns");
        int rowNumInt = Integer.parseInt(rowNumStr);
        int colNumInt = Integer.parseInt(colNumStr);
        int [][] matrix = new int [rowNumInt][colNumInt];

  • How to use Excell formula's within EVDRE

    Hi,
    we want to built a rather large P&L with time in columns and account and cost center in the rows.
    We would like to insert some subtotals within the P&L strucure using simple excel formula's.
    So we create the P&L structure and leave some empty rows in between, which are filled up with excell formula's. The row key range is adapted, so it does not reference the excell formula's. If we hit refresh workbook, our P&L is ready and displaying the correct data.
    Problem now is if we select 'expand all'. My entire P&L structure is changed and displayes the last section of the row key range several times (as many as we have different row key ranges) ... I've put "noexpand" on all of the dimensions on row and column ...
    So normally does one use the functionality of excell formula's within a EVDRE report?
    D
    solved it

    Hi D
    One way is to switch of the expansions and insert the rows and then have the subtotals. to swith of expansion just edit the cell where you have written the evdre function and then remove the formulas pointing to expand range.
    EVSUB in after range would not work here as the whole range is related to one dimension and it works if we have two dimensions and need subtotals
    Regards
    Harish B K

  • How to use math symbols in a right to left text properly?

    Hey there
    When I write a simple mathematical equation or a number(which has sign) in the middle of a right to left text in a text box(I simply set keyboard language to EN for typing expressions & numbers) it's like mathematical symbols are somehow not considered math symbols and that's weird since in word it's not that way, take the following sentence for example that means result of the 0-127 expression is -127:
    حاصل عبارت 127-0 برابر 127- است.
    In word I can type it just fine(for typing expressions and numbers I set keyboard language to EN) but when I type it the same way in adobe acrobat I get this:
    حاصل عبارت 0-127 برابر -127 است.
    copy & paste from word also doesn't do any help, so If I want to get it right I should type math expressions from right to left meaning as instance to type 0-127 I should first type 127 then - and finally 0 also should type digits of a number before typing its sign as example for typing -127 I should first type 127 then - ,now I wonder is it the way acrobat works or I'm doing something wrong.
    By the way OMG o_O even when I did copy & paste my messasge from word to the text box of forum for posting, it ended up treating math parts in upper right to left paragraph the same way as acrobat  I just had to write them from right to left!
    Anyone has any idea?
    Message was edited by: Pooria

    In a word document I wrote:
    حاصل عبارت 127-0 برابر 127- اسـت
    Then tried printing it using "Adobe PDF" printer, in output pdf that sentence was written in right order and interestingly it was broken into three text boxes   thanks for reply.

  • How to get field data using a formula

    I have a table with fields ‘pension contribution’ and ‘current year’.The first field stores a single record for a given year.Say if ‘current year’ is 2014 ‘pension contribution’ is 7% and so on.
    I wanted to get a result by providing a certain year from another field in a table using a formula.
    How do I do this?An explanation would be helpful.

    Hi Nebil,
    You can't! You'll need to join the the two tables or use a Subreport.
    -Abhilash

  • How do I use Aggregate formulas with multiple measures from different tables?

    I have three measures:
    Cash - this sums the £ column in my 'Cash' table.
    Online - this sums the £ column in my 'Online'
    table
    Phone - this sums the £ column in my 'Phone'
    table
    How do I now do aggregate formulas that combine this three measures, for example:
    Find the MIN or MAX of the three measures
    Average the three measures
    I have worked out how to use simple aggregation like add, subtract etc through the CALCULATION formula, but doing the average or MIN/MAX does not work.
    Thanks.

    Hi, thanks for the suggestions.
    Re: Julian
    I had thought about this method, unfortunately it is not always three measures so this doesn't work.
    Re: Tim
    I was not aware of the APPEND formula however I will definitely give it a try and report back - I can see this one working.
    Re: Michael
    Apologies, I have never found a an easy way of simulating some of my issues since it would mean creating a new power model and establishing quite a number of relationships. I definitely see the benefit when posting on the forum since it makes my issue far more
    accessible, unfortunately when I've posted before I've generally been racing against time and not had time to prepare this anonymised data. Is there a quick way of  doing it?

  • How to use Oracle OAB Fast Formulas in Discoverer-desktop [ for reporting]

    Hi,
    Can anyone tell me how to use a fast formula in discoverer-desktop [for reporting]. Currently, we have a disco-report that calcuates the 'monthly salary', but we don't want to use that. Instead, we have a custom fast-formula [xx_oab_monthly_salary] which has the conditions and calculations that we need.
    I want to use that formula in discoverer-desktop directly and get the monthly-salary.. i.e., someone needs to create a folder under the business area and add it i believe.. the formula internally calls a function.
    when i checked about this with my dba - he said, he can add the 'function', but not the formula. and i need to write the calculation part...
    does anyone know how to add it...there shud a way right...
    i do not have access to the technical-stuff here..
    someone said ["you can wrap the FF_EXEC.run_formula call into your own pl/sql function and map this function into the EUL so that the formula can be called from a workbook.", but this talks about pl/sql-do we need pl/sql
    for this].
    also, someone else said [ some fast formulas need specific contexts to be set. Depending on whether the fast formula below the only fast formula that you want to recreate in Discoverer.
    For a single formula, in general my recommendation is to recreate the fast formula instead of using the ff_exec call].
    any quick answers greatly appreciate..
    thx,

    Hi,
    That's right you need to develop the pl/sql function outside of Discoverer using a pl/sql tool or just SQL*plus. I haven't an example to hand, but can dig one up if you need it. Once you have the function developed you can map it into the EUL using Discoverer Administrator. It will then be available to Discoverer Desktop/Plus as a database function when creating calculations. So you can then just add the calculation to an existing or new report.
    Alternatively, you can build the pl/sql function into a view and load the view into a new folder using Discoverer Admin.
    Rod West

  • How to use a cumulative value in a formula

    hi, experts
    I have a question about how to use a cumulative value in a formula. Below is the example:
                            wk1   wk2   wk3   wk4   wk5....wk n
    sales order        5       10    15      10      5
    build plan          8       8     10      15     10
    result                3       1      -4       1       6
    result row is what I want to get, the formula is:
    wk1 result = wk1 build plan - wk1 sales order
    wk2 result = wk1 build plan + wk2 build plan - (wk1 sales order  + wk2 sales order)
    wk3 result = wk1 build plan + wk2 build plan + wk3 build plan - (wk1 sales order  + wk2 sales order + wk3 sales order)
    I've already ticked the cumulative in properity of the key figures. It seems like that the cumulative results only can display, but can't be used in formula. Could you please help me? Many many thanks !!

    Hi
    In properties of that formula, there is option called 'formula collision' there you select 'formula from compiting result'. I think this will solve the problem.

Maybe you are looking for

  • How to connect Zi6 HD camera to mac mini for video in?

    I am wondering what is the best way to connect my Koday Zi6 HD camera to my mini so that I can grab video directly from the camera. The camera has HD and AV mini jacks. It also has a built in flip out usb socket, like the flip camera, but this I beli

  • Three reoccuring issues

    I am not able to open any .png files. I get an error saying, "Could not complete your request because Photoshop does not recognize this type of file." I can not save any image as 'Save for the Web' under my file menu. It is always greyed out no matte

  • Lion recovery didn't erase harddrive

    Hey I have a MacBook Pro, it's 6 months old and has since the beginning been slow but has progressively turned slower and slower. It is necessary to restart a lot as it chrashes down and stops working. Programmes that are especially difficult to work

  • Help, mac mail keeps crashing

    This started about 2 weeks ago, I usually have my mac mail to open when my MacBook starts up, and I think it may have been to do with a random email that got sent from my sister old hotmail account which she doesn't use. It was hacked or something an

  • Xserve hang at boot

    I have an xserve 10.5.6 having issues with it getting stuck at the gray gear screen. booting into safe mode -verbose it freezes on this error:: "acpismc_platformplugin::getCPUPSSdata - warning: _PSS table invalid; ACPI is probably incomplete" i get t