Calculate the average with respect to time (moving average)

hello,
I am desinging a prototype to detect a kind of cardiac illnesses. I am obtaining beats per minute of heart. At the one of stages of project, I want to calculate the running or moving average of beats per minute at every last 10 seconds. For example, the measurement can continue for 10 minutes, but prototype must calculate the average of beats per minute for last 10 seconds. The time interval must be dynamic (as latest) and adjustable. Additionally, I can adjust the time interval, for example last 10 seconds or last 25 seconds. I will be completely grateful for your helps, thank you
Attachments:
heart beat final.vi ‏338 KB

You might want to look at the Mean PtByPt VI.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • My waveform chart is suppose to be with respect to time but I've noticed it is plotted with respect to the number of times through my VI

    I was under the assumption that waveform charts in LabVIEW 6i atomaticly displayed wired data with respect to time in seconds. However, I noticed that my chart plots data with respect to the number of data points my VI has generated. Is there anyway to fix this so that the chart actually plots vs. time. I've attached VI. The CIN is to a Computerboards Inc, thermocouple. Any help would be appreciated.
    Attachments:
    tepTInScan.VI ‏73 KB

    It appears that the chart is set to display relative time but since you don't have the acquisition in any kind of a loop, your relative time is pretty meaningless. You've got the dX of the chart set to be one, so yeah, at the beginning, the x scale numbers are going to be the same as the number of aquisitions until you've run it more than 60 times. At this point, you'll see the x scale show minutes and seconds. If you want absolute time for the x scale, look at the examples Real-Time Chart.vi or Variable-Time Chart XY.vi.

  • I recently purchased a brand new Airport Time Capsule 2TB. I already am using the previous generation time capsule to back up all my computers data. May I ask how can I complement the usage with my new time capsule?

    I recently purchased a brand new Airport Time Capsule 2TB. I already am using the previous generation time capsule to back up all my computers data. May I ask how can I complement the usage with my new time capsule?

    By default your new Time Capsule will broadcast an unsecured wireless network with a network name of something like: Apple Network NNNNNN
    Most likely your iMacs will be connected to the wireless network created by the Virgin Media router. However, both should see the Apple Network under the AirPort icon's drop-down menu as another wireless network that they can connect to. Is this not the case?

  • Wish a bigger led hd monitor and  the battery with longer standby time

    wish a bigger led hd monitor ,the battery with longer standby time and can be separated from cellphone , and less weight

    Sounds like you want a bulkier phone that weighs less or maybe since you want an HD monitor, you want a laptop instead .

  • How to read time stamps from a spreadshee​t and calculate the difference between consecutiv​e time stamps?

    Hi,
    I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
    Time Stamp                    Power Output
    11:00:00 AM                       3kW
    11:00:02 AM                       2.9kW
    11:00:04 AM                       3.2kW
    11:00:06 AM                       3.1kW
    The above data doesn't make any sense, but it is just for the purpose of this question.
    So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that

    Hello
    you can simple subtract one time from the other one and so you get the difference. -> Example
    Mike
    Attachments:
    Unbenannt 2.vi ‏8 KB

  • How to calculate the difference between 2 different times being input.

    import java.io.*;
    import java.util.*;
    public class ClockingInOut
    public static void main(String[] args) throws IOException
    BufferedReader keyboard = new BufferedReader (new InputStreamReader (System.in));
    String input, input1, input2;
    int num1, num2, answer;
    System.out.println ("\t\t\tEMPLOYEE CLOCKING IN AND OUT SYSTEM!");
    do
    System.out.print ("\nWould you like to clock in and out? yes (y), no(n), ?: ");
    input = keyboard.readLine();
    if (input.equals("y"))
    System.out.print ("Please enter the hours you clocked in: ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("Please enter the minutes you clocked in: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    System.out.print ("Now Please enter the hours you clocked out! ");
    num1 = Integer.parseInt (input1 = keyboard.readLine());
    System.out.print ("And please enter the minutes you clocked out!: ");
    num2 = Integer.parseInt (input2 = keyboard.readLine());
    Hi people, i think my coding may be wrong. I would like the user to input the hours and then minutes of the time they clocked in and out of work. and then i want the program to be able to calculate the hours worked and print the mesage in the Command Prompt window.
    It's really confusing and hard, please help and provide me with the correct soure code if you can.
    Also, like in html how the notepad file has to have the opening and closing brackets, does java coding have something like this.
    Please reply. Thank You.

    hi
    check this java class
    import java.sql.Time;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    public class util
        public static void main(String[] args)  throws Exception
            long t1 = getTimeOnlyLong();
            Thread.sleeo(2000);
            long t2 = getTimeOnlyLong();
            System.out.println(differenceBetween2Times(t1,t2));
        public static long getTimeOnlyLong()
            Date d = new Date();
            return d.getTime();       
        public static String differenceBetween2Times(long l1 , long l2)
            long diff = l1 - l2;
            System.out.println("differ =  " + diff);
            Date d = new Date();
            d.setTime(diff);
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            return sdf.format(d.getTime());       
    }

  • How can I calculate the characters with spaces in a document on pages

    I'm currently using pages to write my personal statement up on, although i need to keep my characters including spaces under 4000 characters and also have no more than 47 lines. I've found how to do a word count and find how many charcaters I've used, but i can't see anywhere the information that I actually need to find! Someone please help, thankyou

    How can you calculate the number of lines if you don't know how many characters there are to a line?
    This is 2013. We are using word processors with real fonts, not terminals or teletypers or typewriters.
    If you must have 47 lines then shrink the point size of the font until it fits.
    Peter

  • Csv file reading and voltage and current plotting with respect to time samples XY plotting

    Hallo,
             I've been struggling with reading  a comma separated value (csv) file from another instrument (attached). I need to plot this data for analysis. I have 5 column of data with numbers of rows, the first three row is the information of the measurement. I want to read 4th row as string and rest of the row as numbers. I want to plot 2nd column (i1)  with respect to TIMESTAMP; 4th column(u2) wrt TIMESTAMP. And finally plotting i1 (x-axis) vs.. u2 (y-axis) in labview. Could anyone help me.
    In excel its so easy to plot  but I don't know how its done in labview.
    Attachments:
    labview forum test.csv ‏30 KB
    excel plot.jpg ‏88 KB

    Start by opening the file.  Then use the Read Text File function.  You can right-click on it and configure it to read lines.  First make it read 3 lines (this is your extra header data).  Then make it read a single line.  That will give you your channel names.  Then read the rest of the file (disable the read by line and wire a -1 into the number of bytes to read).  Then use the Spreadsheet String to Array function to give you your data.
    I would recommend going through the LabVIEW tutorials if you are really new at this.
    LabVIEW Basics
    LabVIEW 101
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Calculation logic for date with respect to time.

    Dear all,
    In BI, i want to get the time for two different dates - how to caculate this
    For example
    Initial date :- 01.08.2007
    Final date :- 24.08.2007  - I want system to calculate the total hours between these dates - the logic should also be applicable if years,months and days are different.
    Regards,
    M.M

    Dear ....
    By subtracting final from the initial we will be able to get if the difference is only in days but if the month or year is differing will the same logic hold good - kindly explain?
    Regards,
    M.M

  • Calculate the difference between two dates times in infopath form 2013

    Hi,
    I have an infopath 2013 form that contains three fields:
    2 date time and the 3rd contains the difference between the two in hours
    how I can make the difference between the two so that the display will be like this:
    Date Time1           08/21/2014           22:00 
    Date Time2           08/22/2014           1:00
    Diff Field                                             3:00

    Hi,
    Please refer to the following article which matches your requirement exactly.
    Calculate the difference between two date picker controls in InfoPath using rules and formulas - no code!
    Please mark it answered, if your problem resolved.

  • Tracking  the stocks with respect  to UD CODE

    HI
    we  are posting  qty  in  only storge location with respect  ud.we have different ud codes  , i want to track stocks with respect to ud.
    regards
    Baswaraj

    Hi,
    Could you explain the situation where you need to get the stock report based on UD code?
    To my knowledge if the material is not batch managed, you cannot divide the stock received from two different orders based on UD codes.
    If the material is batch managed, you can get batch stocks along with UD codes (of the latest inspection lot pertaining to the batch) in to a customized report.
    Revert for any clarifications
    Venkat V

  • I am unable to open files on amything!!! a box pops up that asks me what do i want to open the file with..every time!! I want files to open when i click on them!! This happens with emails, websites, everything

    I try to open attachments in emails and they will not open! A box comes up asking 'what do I want to open the file with', and it wants me to select from a list of options like - Firefox, IE, Word, Yahoo Browser. When I make a selection (usually Firefox) a new tab opens with a blank page! This always happens on attachments, links, websites......everything!

    These files were lost two years ago.
    That's not consistent with what you wrote in your first message. I can't help you unless I know what's going on. Either you do, or do not, have backups of all the data you want to keep. If you do not, then the first thing you need to do is back up those files. It makes zero sense to do anything else. In order to back up, you'll need either of two things: another Mac, in working order, with a FireWire port and enough space on its internal drive to hold your files; or an external drive, also with enough space.
    On the other hand, if you do have backups, or if you simply don't care about any of the data, then the solution to your problem may be quite simple. All you have to do is boot from your installation disc (your profile says you're running Mac OS 10.5), erase your internal drive, reinstall the Mac OS, then restore your data from backup. You will need to be selective in restoring software, because incompatible software may be what caused the issue.
    But it's also possible that you have a hardware failure, in which case you can't get your computer working again until it's repaired.

  • PLOT THE OUTPUT VOLTAGE WITH RESPECT TO TIME

    I have VI that is controlling the Standford Research power supply model PS350. I am using existing NI drivers for this instrument.
    I wanted to know what would be the easiest/fastest way of taking the multiple readings of the output voltage at the different point in time and then plotting the voltage versus time.
    Any directions and suggestions are appreciated.
    thanks,
    Pedja

    I cannot tell you any specific information about your device but if you want to plot your data in LabVIEW, I recommend using an XY Graph. This graph allows you to associate a specific y with a specific x. Consequently you can plot data where the time between the sample changes. Look in the LabVIEW shipping examples for an XY Graph example.

  • Key figure display in planning book with respect to Time bucket profile

    Hi,
    I am loading a key figure to planning area from the info cube for the current month. When I review the key figure in planning book with monthly time bucket profile it shows 85 for the current month. In the same planning book with weekly bucket profile, it shows 55 from the current week and future weeks and the remaining 30 goes into the past weeks of the current month.
    How to make the total quantity 85 to show in the current and future weeks only.
    thanks and regards
    Murugesan

    Hi Murugesan,
    Within the Planning Area, the data is stored at the lowest level granularity that you maintain in storage bucket profile. Then during display, system will decide what data to show depending on what kind of time bucket profile you use in the planning view, and the time based disaggregation that you maintain for Key Figure.
    In this below case, what time characteristic do you have in cube? Is it date, week or month?
    If it's date, check how much KF data is maintained on the dates which belong to week which has days both in this month/last month e.g. if I talk about Dec 2011, how much data is stored 1,2,3 & 4 th of Dec, 2011.
    This data would appear in Dec in monthly view, but in week, it would appear in the week starting 28th November.
    If data is maintained in cube in weeks, then you need to calculate how time based disaggregation would show it to you in months.
    If it's months, then you would need to find out how much data would go to the days in the past week of the month.
    The time based disaggregation may be causing you some issues, but in that case, I would not expect 30 out of 85 to go in the past week, unless you have data in cube in days.
    Data shown in weekly view for week starting 28th Nov should ideally be a small proportion of 85, unless you are using a time stream/fiscal year variant, due to which most of December is in holidays.  The only other exception I can think of is that you have data in teh days mentioned above.
    It would be best to help the business understand this disaggregation logic, rather than thinking of manipulating the data to shift to a later week.
    If this logic doesn't explain your situation, then please provide the date/week/month at which you have data in cube, and what quantity.
    Thanks - Pawan

  • How to calculate the days with a date field

    I need to make a query that shows the number of flown days at the end of the month for the whole fleet, given a date that represents one day within that month.
    I would appreciate all the help I can get
    thanks in advance

    Hi,
    I am not sure if I interpreted your question correctly, but are you looking for counting for number of days between two days?
    If yes, see if the following example query helps you.
    SQL>select to_date('30-Jun-2003') - to_date('30-May-2003') from dual
    - this returns 31.
    If not, could you please give more details of your requirement with an example?
    -Savitha.

Maybe you are looking for