Continuously perform calculations on the data

Hey guys,.

So I have this program that generates pulses of signals using NOR-SCOPE, and I initially did so that each time that the user presses a button that they will perform certain calculations in order to generate a value that is stored in a table. My mentor now wants me to do so that it generates continuously pulse signals (not a single signal) and adds the values in a table. The signal seems so I need to use the parameter N samples on NI SCOPE as it does in the code below, although if anyone has a way to change this, it would be nice too.

So basically, how can I calculate continuous pulse generated automatically over time signals? The user does not have to run the program and the computer does the rest.

Thank you!

You must migrate to a structure of producer/consumer. In the loop of the producer acquire the data contimuously and pass it to the loop of consumption. In the loop of the consumer, analyze the data and store the data as needed.

A variation on the theme that I recommend is that instead of using a queue to pass data, use a user-defined event. The reason for this change is that your current code (which is basically what will end up in the loop of the consumer) is so pass data to loop through an event will allow him to fit into the current structure of the user interface.

Oh, Yes, one more thing: get rid of the Express live. It's time to remove the training wheels...

Mike...

Tags: NI Software

Similar Questions

  • Can I perform calculations on the values of date?

    I'm trying to set a range of dates using two calendar features by entering a date "from" and a "to".

    This is done using a JavaScript that is bound to a textbox control for entering a date.  He is my date "from", if I can check this date against today to confirm that the date is later than today, that is in the future.  I have no experience with javascript, but know PASCAL.

    I then a second box with another calendar date, I want to automatically fill this box on the same date as the first area unless physically, the user wants to change the date of the last.

    Can anyone help?  I'd appreciate some tips so that I can try and learn a few Java along the way.

    GetField ("Text1") .value = s;

    There are two problems with that. The method is getField, not getfield. You must also pass the name of the field as a string. So it should be:

    s = getField("text1").value;

  • Impossible to perform calculations in the background

    I have System 9 bi + AAS9.3.0.1

    From the console of the AAS I'm more able to run scripts of calculation in the background.

    When I run the calc script I select "Run in background" and click "OK".

    It seems to work. But when I check the background process I get the following:
    -start and end times are the same
    -status is always "successful".
    I check my data and can check without calculations have been made.

    I see that I can take a few minutes to perform calculations. I know this because I can run the same script calc in the forground and I see that it takes several minutes to run.

    I was able to run in the background until about 2 weeks ago. I went as far as restarting all my servers without effect.

    Any ideas what is the cause? Or how to fix?

    Thank you
    D

    If I remember correctly, it was a bug.
    Try to search for a file named workstatus.xml on the server of the EAS, rename the file and restart AAS.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Reliable message of guard - performance issues - of the data?

    Hello, we are on 10.2.0.3 (I know, time to upgrade, just can't right now). Data Guard is in place, in AVAILABILITY of maximum production work that was ongoing for 3 years once a week with no problems started taking 10 + hours. He used to take 2 hours Max checked, everything, nothing has changed. Ran AWR report and see that the high wait event is a RELIABLE MESSAGE:
    Top 5 Timed Events 
    
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class 
    CPU time   45,270   97.5   
    *reliable message 2,655 534 201 1.1 Other*
     db file sequential read 199,278 366 2 .8 User I/O 
    db file scattered read 122,914 287 2 .6 User I/O 
    LGWR wait on LNS 35,511 209 6 .4 Network 
    Is - this Data Guard? What can we do to fix this? I dropped the day before, tried to re - run this job and still have high reliable message:
    Top 5 Timed Events 
    
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class 
    CPU time   11,490   98.7   
    reliable message 804 77 96 .7 Other 
    db file scattered read 92,969 34 0 .3 User I/O 
    db file sequential read 17,596 25 1 .2 User I/O 
    log file parallel write 13,268 11 1 .1 System I/O 
    I don't understand much about Metalink. If I dropped the day before, newspapers are not speeding it more, shouldn't that have improved performance? Or should I disable the configuration to test any scenario Data Guard in this case? In the last configuration disabeling required re-buillding DG however. Please notify. What is the reliable message? Thank you!

    My bad. You are right, they are 10MB.

    I have galanced bytes and somehow added an extra 0.

    The 200 MB comes from the query - 'optimal_logfile_size = 201.

    The rule of the 20 minutes of CKPT is good, but sometimes the databases have a peak period, which is only about half a day.

    10 MB is a bit small, I consider what makes them great. At least 100 MB.

    I remember you, you had the 'Data Guard - total loss of primary education"question just now.

    Best regards

    mseberg

  • Calculation of the date fields

    Hello

    I have three fields. 2 are formatted with the date field, and the third for the calculation of the difference between 2 date fields.

    For example, Field1 said August 2012, and field 2 said Sep 2012. Is it possible that I can do field 3 dipslay the 1 (month) response?

    Any help would be greatly appreciated.

    Thank you

    Yes, you use the date object JavaScript extract fields of the whole of the year and the month, create a common denominator for the month and year, and do the math.

    The event of calculation for the number of months:

    Delete the result value

    Event.Value = "";

    get field values

    var sStart = this.getField("Date1").value;

    Send var = this.getField("Date2").value;

    process if we have data

    If (sStart! = "" & send!) = "") {}

    convert date objects date strings

    var start = util.scand ("mmm yyyy", sStart);

    oEnd var = util.scand ("mmm yyyy", sending);

    get the full date and month year beginning

    var nStartFullYear = oStart.getFullYear ();

    var nStartMonth = oStart.getMonth ();

    convert data from start of month

    var nStartMonths = (nStartFullYear * 12) + nStartMonth;

    Get the complete year end date and month

    var nEndFullYear = oEnd.getFullYear ();

    var nEndMonth = oEnd.getMonth ();

    convert data from end of month

    var nEndMonths = (nEndFullYear * 12) + nEndMonth;

    do the math

    Event.Value = nEndMonths - nStartMonths;

    } / / end have given

    You will need to adjust the names for the start and end dates.

  • Perform calculations between the weeks and categories

    Given this example, if I calculate the difference between each week the intention and filing to show in the lines of the plan again and again filing?
    Row#     SEM     STUDENT_LEVEL     COLLEGE     PROGRAM     STATUS     Y3W2     Y3W3     Y3W4     Y3W5     Y3W6
    
    1     40     GR     BN     BMA-SJ     14.Intend     132     132     137     139     139
    2     40     GR     BN     BMA-SJ     17.Deposit     100     111     115     114     117
    3     40     GR     BN     BMA-SJ     20.New Intend     0     0     0     0     0
    4     40     GR     BN     BMA-SJ     21.New Deposit     0     0     0     0     0
    For example, the value displayed in Col: Y3W3 line #4 deposit must be the result of line Y3W3 2 - Row 2 Y3W2. Digitally: 111 minus 100 = 11.
    Tier 4 after that calculation should look like:
    4     40     GR     BN     BMA-SJ     21.New Deposit     1     11     4     0     3
    If the change is negative, then we would show 0.

    There are also some Calc percentage within the week and the categories and between weeks and years, but if understand us this, we can hope that use to others, so we won't post the part yet.

    Here's the query portion and sampling data. The sample data are summarized from the level of detail:
    WITH ADMLIST AS 
    (
    SELECT 1 AS WEEKNO, 2009 AS YEAR,          40 AS SEM, 
        'GR' AS STUDENT_LEVEL,  'BN' AS COLLEGE, 'BMA-SJ' AS PROGRAM, 
        '14.Intend' AS STATUS,  139  AS TOT
    FROM DUAL UNION ALL 
    SELECT 1 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',    94 FROM DUAL UNION ALL 
    SELECT 1 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 1 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL UNION ALL 
    SELECT 2 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '14.Intend',    132 FROM DUAL UNION ALL 
    SELECT 2 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',   100 FROM DUAL UNION ALL 
    SELECT 2 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 2 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL UNION ALL 
    SELECT 3 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '14.Intend',    132 FROM DUAL UNION ALL 
    SELECT 3 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',   111 FROM DUAL UNION ALL 
    SELECT 3 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 3 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL UNION ALL 
    SELECT 4 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '14.Intend',    137 FROM DUAL UNION ALL 
    SELECT 4 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',   115 FROM DUAL UNION ALL 
    SELECT 4 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 4 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL UNION ALL 
    SELECT 5 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '14.Intend',    139 FROM DUAL UNION ALL 
    SELECT 5 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',   114 FROM DUAL UNION ALL 
    SELECT 5 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 5 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL UNION ALL 
    SELECT 6 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '14.Intend',    139 FROM DUAL UNION ALL 
    SELECT 6 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '17.Deposit',   117 FROM DUAL UNION ALL 
    SELECT 6 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '20.New Intend',  0 FROM DUAL UNION ALL 
    SELECT 6 , 2009, 40, 'GR', 'BN', 'BMA-SJ', '21.New Deposit', 0 FROM DUAL 
    )
    SELECT sem,
           student_level,
           college,
           program,
           status,
    --       max(CASE WHEN WEEKNO=2 AND YEAR=2007 THEN TOT END) AS Y1W2,
    --       max(CASE WHEN WEEKNO=3 AND YEAR=2007 THEN TOT END) AS Y1W3,
    --       max(CASE WHEN WEEKNO=4 AND YEAR=2007 THEN TOT END) AS Y1W4,
    --       max(CASE WHEN WEEKNO=5 AND YEAR=2007 THEN TOT END) AS Y1W5,
    --       max(CASE WHEN WEEKNO=6 AND YEAR=2007 THEN TOT END) AS Y1W6,
    --       max(CASE WHEN WEEKNO=2 AND YEAR=2008 THEN TOT END) AS Y2W2,
    --       max(CASE WHEN WEEKNO=3 AND YEAR=2008 THEN TOT END) AS Y2W3,
    --       max(CASE WHEN WEEKNO=4 AND YEAR=2008 THEN TOT END) AS Y2W4,
    --       max(CASE WHEN WEEKNO=5 AND YEAR=2008 THEN TOT END) AS Y2W5,
    --       max(CASE WHEN WEEKNO=6 AND YEAR=2008 THEN TOT END) AS Y2W6,
           max(CASE WHEN WEEKNO=2 AND YEAR=2009 THEN TOT END) AS Y3W2,
           max(CASE WHEN WEEKNO=3 AND YEAR=2009 THEN TOT END) AS Y3W3,
           max(CASE WHEN WEEKNO=4 AND YEAR=2009 THEN TOT END) AS Y3W4,
           max(CASE WHEN WEEKNO=5 AND YEAR=2009 THEN TOT END) AS Y3W5,
           max(CASE WHEN WEEKNO=6 AND YEAR=2009 THEN TOT END) AS Y3W6
    FROM ADMLIST
    GROUP BY sem,
             student_level,
             college,
             program,
             status
    ORDER BY 5;

    Hello

    You can get the difference from one week to the next (or 0) using the analytical LAG function, like this:

    GREATEST ( tot - LAG (tot) OVER ( PARTITION BY  status  -- and maybe other columns, like sem, student_level, ..., too
                                           ORDER BY      year
                          ,          weekno
                        )
           , 0
           )     AS dif
    

    Corresponds to the data you posted really what is in your tables, or is it the result of an earlier stage?

    If it's really in your tables, and then instead of select of your tables, select in a UNION of
    (a) your table except the lines where status = '21.New' file
    (b) your table, once again, with status ='21.New deposit "and the numbers of dif (as shown above) in the column tot.

    If the data you posted is a partially digested form of your RAW files, then dif can probably be incorporated into the digestion process.

    In any case, calculate dif until you rotate the data.

  • I have a PC with Windows 7 Professional and Adobe Reader.  Adobe continued auto changing all the dates in a PDF document.  Help!

    I am doing an interactive PDF for an insurance company.  The form has several dates that should be filled, as my DOB, date of the training and the date of the current medical certificate.  If I enter data in one of the date fields, it automatically changes all dates.  Of course, these dates are all different, but it does not make them different.  This happens also for address fields.  I have to be able to enter my home address and the address where I completed my training.  I went to: Edition-Preferences-Form and not the box 'automatically calculate field values' and 'AutoComplete' off.  Changing always automatically all similar fields with the same data!  Help, please!

    It occurs because the form designer has done a terrible job in this area and just copy & pasted fields, which means that they are identical copies of each other. You can not do something to prevent that from happening. Report the problem to the insurance company. They have to sort on their end.

  • Perform calculations using the number of records

    I'm working on a formula that calculates an employee vacation time. The employee of begins with a static balance, say 120. The employee can enter their vacation time, as they take. They cannot get it in increments of 8 hours or 4 hours, for each record in the database will reflect 8 or 4 hours. I want to be able to view a current balance for the employee. So if the employee connects and takes a week of vacation, they will have to enter 5 records with 8 hours each. How to calculate this to get the desired balance of 80? I'm not very fluent with calculations in the CF, but think that it must involve the Recordset. It's probably very easy, but I am confused.

    Any help would be great! Also if I didn't explain it properly, let me know and I'll try to provide more details.

    Jatrix wrote:
    >
    > Any help would be great! Also if I didn't explain it properly, let me know
    > and I'll try to provide more details.
    >

    Well, you * could * simply add all the fields "vactaionTime" of each
    record in the Recordset. I.E.





    #totalVac #.

    But it's really much easier to do with some simple SQL codes.

    SELECT empID, sum (vacTime) AS totalVacTime
    FROM EmployeeTable
    GROUP BY empID


    #empID # #totalVacTime #.

  • Not able to perform the calculation on the data base not tabular column

    Hi all

    I have a master's degree and a tabular form of retail that has of the following requirement:

    • If I choose two feel in my element Type of trip in my master form, no. tickets in my detailed tabular form must have doubled this IE. 2 * number of tickets
    • The number of tickets is a field display text (does not state) so I'm not able to select the value of the field in jquery.

    Kindle help me with this.

    Thank you and best regards,

    Madonna

    Hello Nicolette,

    I solved by creating a function of database and used in the source region of the form of the table with the column attribute as display text (does not save the State).

    Thank you for your help.

    Kind regards

    Madonna

  • Cumulative to the calculation of the date for the crossing of different years of formula writing or member calc or BR

    Hi all

    I know if it is possible to summarize the cumulative amount of an account, for example "Cash" of a given year and the period, for example "FY10"->"Jan" at & CurrentYr-> & CurrentMth (e.g. FY14-> Oct) by member formula or calc script or BR?

    Thank you

    Eddy

    Hello Eddy,.

    Have you tried to use the @XRANGE function, that's close to what you are looking for.

    Thank you

    (Please check this post useful or appropriate if this can help you)

  • Heavy calculations in the database.

    Is it wise to place heavy calculations in the database?

    Lets say, we need to create in-app to calculate a problem heavy matimathical.
    In Apex, each code is run in the oracle database. What are the resources used for this calculation?

    Java database programming is only used for the extraction of the code. That's what I see in other departments. so I guess the resources of computers (where the java application is installed) are used for calculations.

    For heavy, so apex calculations always a good option?

    Raoul

    Hi Raoul,.

    It depends on what you mean by heavy calculations.

    As you say, Apex code is executed in the database, most of this is PL/SQL that runs in the server of database resources. for example, memory, processor, etc. IO. PL/SQL is a mature programming language that can be stored in a compiled state, which gives it a factor of performance approaching compiled languages such as C. While it may be true that you can get better performance of well written code compiled like C, overload caused by the first extraction of data to perform the calculations on in the first place often means THAT PL/SQL has an advantage. In other words, more calculations are the data, the better.

    I don't know what you mean by "Java database programming is only used for the extraction of the code". The database is used for the storage and retrieval of data. Java is used as a general programming language which has the advantage of running in a variety of environments. Overhead, he pays for it are that it isn't really a compiled language and therefore performed accordingly. Accordingly, it is a good language for the presentation layer, where there need work on a wide variety of customers, but you would not use it as general processing language.

    If you condition is to do some heavy math and you use a database to store the raw data for these calculations so I think that you will find the database and internal languages such as SQL and PLSQL will be run and any other environment in General and certainly much better than the Java language.

    Concerning
    André

  • Getting the data center of VirtualMachine with Get-View information

    Hello

    Y at - it a faster way to get the name of data using Get-View and the viewtype VirtualMachine Center.

    I found the following:

    Get-View -ViewType VirtualMachine -filter @{ "name" = "mtl1fsit02" } | Select-Object -Property Name,

    @{ Label = "GuestOSName"; Expression = { $_.summary.guest.guestfullname } },

    @{ Label = "Datacenter"; Expression = { (Get-view (Get-View (Get-view $_.parent).parent).Parent).name } }

    Thank you guys

    I think that the property calculated for the data center does not work in all situations.

    It assumes that your virtual machines are 3 levels down from the data center, which is not always the case.

    I personally use a loop, passing up through the parents, until he finds an object data center.

    something like that

    @{N = 'Center'; E = {}

    $parentObj = get-view $_. Parent

    While ($parentObj - isnot [VMware.Vim.Datacenter]({))

    $parentObj = get-view $parentObj.Parent

    }

    $parentObj.Name

    }

  • ALLOW JOB ON INSRERTION OF THE DATA IN THE TABLE

    Hi all

    I have two seprate databases schemas.

    For simplicity say SCHEMA ABC and XYZ of SCHEMA.

    In SCHEMA XYZ, I have a table whose data are inserted (TIMING NOT FIXED).

    This table is accessible via DBLINK in SCHEMA ABC and is then processed.

    Currently work is designed to operate at 7,8,9 in the morning to process these data.

    However, it is possible for data to come after 9 in which the process must be manually executed.

    I want to change this and do the work to be performed on when the data are inserted into the table and not in due time.

    Please advice in this regard.

    Any suggestion would be appreciated.

    Thanks in advance.

    What happened AFTER statement level INSERT trigger?

  • How to validate the data in the source

    Hi all


    I am new to ODI, in my process could be called in 2 modes of Validation and load

    a. validation - V - should perform validation on the data from the source according to the filter criteria
    b. load - L - could make a mandatory check and load the data into the target table

    My concern is how do only validation on data sources, please share any ideas on this...


    Thanks in advance...

    Dragging data store in the package in order to apply the static control, you are doing your validation without loading.
    This validation step will copy the invalid data in the table of errors (E$) and you can also decide if you want to remove from the source (and keep the data only in the error table).

  • calculation of the average value of the sorted data and polar route drawing

    Hello

    I did a VI that calculates the average value of the wind rotor/speed-ratio in the sections of 30 degrees (wind direction). He also called the polar plot of calculated data. Everything works, but I would like to make more detailed calculations and drawings, by increasing the resolution to 1 degree, or...

    Problem is VI, I did, is not easy on a large scale. At the moment, I have 12 parallel structures of switch-box to calculate the average value and build the array function to collect data calculated for Polar plot to draw the image in real time. I know it's probably the worst way to do it, but since I have done a few things with LV, it was the only way I managed to do what I wanted.

    Now, if I continue in same way to reach my goal, I have to create 360 Parallels switch-case structures... that are crazy.

    Something like the calculation of the average of the table or matrix (zero/empty values should not be calculated on average) inside the loop or similar way would probably be the best solution.

    So, polar plot drawing is not a problem, but creating a reasonalbe average metering system is. Any ideas?

    I would also like to rotare northward to the top (0 deg), and degrees of increase in a clockwise direction on polar ground dial plate (as on the compass).

    VI on the attachment. (simplified version of the complete system)

    I have signals:

    -Wind speed

    -wind direction

    -Rotor speed

    I want to:

    -calculate the average value of the speed of the wind / rotor - ratio in sections (5 degrees, 1 degree)

    -Draw a polar path of the wind rotor/speed-ratio of averages in propotion of wind direction

    I'm using LabView 2009

    Thank you very much.

    It is closer to what you're looking for?

Maybe you are looking for