Calculate the average value of 10000 samples stored in a file. LVM with LabView

Hello, I'm using a NI 6034 to acquire through _ LabView a signal in volts from a pressure transducer, these data then save them to a file. Lvm using the "write to a file" (at least I think you call it or something like that). I would have 2 questions:
1) you can always using the virtual instruments to implement a block I calculate directly the average of these 10 thousand values ​​without having to go to the star on excel every time?
2) is it possible to somehow remove the header that LabView a creates by default in the file. LVM when you save?
I hope someone will give me an answer because I'm really losing a lot of precious time to pass each time data from lvm file to the excel.
Thank you in advance for your advice.
Solved!
Go to Solution.

Marco86,
1. You should be able to read the data directly from the .lvm file in LV. Use the Express VI Read from Measurement File. You can wire the Signals output to the X input of the Mean.vi from the Mathematics >> Probability & Statistics palette.  LV will automatically insert a conversion from the Dynamic Data Type output of the Read to the 1D Array of Doubles that Mean needs.
2. I rarely use the Write to Measurement FIle Express VI so I am not sure whether you can completely suppress the header.  If you use the Write to Spreadsheet File.vi you get a tab delimited text file containing only your data converted to text and delimiters.  You can create you own headers by writing a string array to the file before writing the numeric data.  Of course you can have complete control over everything in the file by using the low level file functions and data manipulation and string conversion functions.
Lynn

Similar Messages

  • Calculate the average value

    the data I measured changed rapidly, so i want get the average value of the data
    Do not tell me to use mean.vi , i have already know that.
    and i got an idea which is add the data into an array every time, then sum of all the data value and take the result divide by the number of elements
    but i dont know how to achieve that, anyone can build a simple vi to show me ? thank you
    i have attached my vi which is using mean.vi to calc the average value, you can delete it and using in your way ,  thank you !
    Solved!
    Go to Solution.
    Attachments:
    EN-new.vi ‏274 KB

    Hi I got a similar issue for averaging. I used the mean.vi from the math function but the average is rolling when i run it. I am trying to calculate the average for the data i read to the RT FIFO (which is around 40000 lines).I got the writing part working, however, when i am reading the data, I couldn't get it working. I thought i read the data as a 1-D array, and then pass it to the Mean.vi and then got the result. But seems like the mean is only showing the last data in the array.
    Can someone help me with this??
    Attachments:
    FPGA-vi.png ‏242 KB
    RT-vi.png ‏182 KB
    RT-2mod.vi ‏515 KB

  • How do you find the average value of all the data between two points on a single channel

    I am tring to calculate the average value of all the data points on a single plot between two seperate points
    I have attahced an illustration.
    Tim
    Solved!
    Go to Solution.
    Attachments:
    plot.jpg ‏173 KB

    Hey smoothdurban,
    I've seen Brad's code, and trust me, it's worth the effort to let him help you get it up and running - it's definitely the most ideal way to solve this problem.  However, as Brad said, there are multiple ways to tackle this - both interactive and programmatic - so in the meantime, I'll take a second to detail one of the interactive and sure-fire ways to find the average of data between two points on a single channel.
    We'll use"Flags."  Set up your VIEW graph exactly as you did on your original screenshot, using Band Cursors to approximate the beginning and ending X-values representing the range you want to examine.  Next:
    1. Click the "Set Flags" button () that is a part of your 2D Axis System.  Note that you can hold down the Shift button if you ever decide you want to do this on more than a single curve at one time.
    2. Select the "Flags: Copy Data Points" button that enables after Flags are set.
    3. This creates new channel(s) in the default (bold) group in the Data Portal that contains only the Flagged data.
    4. Select DIAdem ANALYSIS.
    5. Select Statistics » Descriptive Statistics.
    6. In the Channels input, select the newly created channel containing your Flagged Y-Data.
    7. Ensure that the Arithmetic Mean parameter is set.  You can preview the data and the result in the dialog before pressing OK to execute the calculation. 
    You may have noticed that in the Descriptive Statistics calculation, one of the parameters that you can set is the range of channel rows to operate on - so, if you know the row numbers of your beginning and ending X-values, you could just simply run the Descriptive Statistics calculation and use this parameter to operate on a row subset of your original channel instead of the entire channel.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • How do i calculate the average of runs that have variable number of samples?

    Hi
    I am trying to calculate the average trajectory from  lets say 4 runs, with varying sample size.
    That is, if the the 4 runs have 78,74,73,55 samples respectively, How do I calculate the average of (78+74+73+55)/4 , (78+74+73)/3 and (78+74)/2  and 78/1 ?
    Thank you

    I'm not sure you gave a sufficient information. Assuming that you just want to calculate a linear average of the data collected in consecutive runs, you have two simple methods :
    1/ concatenate the data before calculating the mean.
    Simple, but can occupy a huhe amount of space since all the data have to be stored in memory
    2/ store only the means Mi and the corresponding number of data points ni and calculate a balanced mean : M = sum (ni x Mi) / sum (ni) )
    The attached vi illustrate both methods.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Averages.vi ‏40 KB

  • Average value of N samples

    Hi,
    I have a problem. I'm reading data continuously from analog input. I want calculate average value when I press button START. Average value should be calculated from samples which are defined by 'Number of samples' and 'millisecond multiple'. When all samples are read, average vale should show.
    The problem is that when number of samples is higher then 10, it doesn't work.
    Can someone tell me what I did wrong?
    Thanks
    P.S.. I saw that there was something like this but I can't open it because I use Labview 8.5
    Attachments:
    Average.vi ‏35 KB

    For that you need to store the previous value for averaging... i have attached a VI regarding that ( sorry no time to cleanup ).. You can use the logic to calculate the average of the samples (Still am not clear about you requirement).
    The best solution is the one you find it by yourself
    Attachments:
    Average_anand.vi ‏26 KB

  • How to calculate the average inventory in ABAP

    Dear All,
    Please find the below formula and this formula how to calculate the Average inventory at value.Please let me know the abap base tables and the corresponding fields.
    Formula
    Inventory Turnover = Cost of Goods Sold (COGS) / Average Inventory at value.
    Thanks
    Regards,
    Sai

    Hi Arivazhagan,
    Thanks for your quick response .
    The field MBEWH from the table is fulfill the average inventory at value.
    For Eg :I want to calculate Inventory Turnover = Cost of Goods Sold (COGS)/
    Average Inventory at value.
    so shall i take Inventory Turnover = Cost of Goods Sold (COGS)/MBEWH
    The above formula will meet my requirement to find the average inventory Turnover.
    Thanks
    Regards,
    Sai

  • How do I calculate the average of ONLY the populated fields?

    I'm working on an Adobe form to streamline the process of summarizing course evaluations.  To protect the anonymity of the students, instructors with 10 or fewer students are given a typed summary of the evaluation results.  On the first half of the evaluation, the students are asked to rate a series of statements from 1-5.  Three of these are highlighted on the summary form with the average response. 
    I've already set up the form with 10 unique boxes for each question and an 11th box which calculates the average.  Each field is named according to the question number and the student's "number" (I arbitrarily gave each student a number so that each field would be unique):
    i.e. #1. Questionquestionquestion.  Q1S1  Q1S2  Q1S3  Q1S4  Q1S5  Q1S6  Q1S7  Q1S8  Q1S9  Q1S10  1AVG
    The problem, of course, is that no matter how many students were actually in the class, the AVG field will always be calculated based on a group of 10...which isn't accurate or fair to the instructor.  I thought about just changing the form and removing the unused fields from the equation each time I make up a new summary, but the point of creating a form was to make it as quick and easy as possible to bang these things out... Plus, some of my coworkers might be using the form from time to time and I'd have to explain what they have to do and if they don't have Adobe Acrobat then they can't actually make the changes and blah blah blah...it just gets ridiculous really quickly!
    So anyway, I tried reading some other posts for similar questions in an attempt to figure out a custom calculation script for myself, but I just couldn't focus on it.
    I was hoping someone could explain how to write a custom calculation script that will omit any fields which are left blank... Or, even better...is anyone willing to write it for me?  At least just an example of the first guy, cause I could probably figure out how to get all the other ones from there.
    Thanks.

    In formcalc the function Avg will calculate the average of only the fields with a value in them. So you would would put in the calcuate event of the average field:
    $ = Avg(Q1S1,Q1S2,Q1S3,Q1S4, etc)

  • Javascript to Calculate the Average of a column

    I have a column of fields in my PDF that I am trying to calculate the average for.
    My problem is that there are 7 fields, but all 7 may not be filled in so I think I need some kind of "if" statement that would only count the number of fields that have values.  Then somehow work that into the rest of my calculation...
    This is what I have so far...
    (function () {
        // Get all of the field values, as numbers
        var v1 = +getField("column.0").value;
        var v2 = +getField("column.1").value;
        var v3 = +getField("column.2").value;
        var v4 = +getField("column.3").value;
        var v5 = +getField("column.4").value;
        var v6 = +getField("column.5").value;
        var v7 = +getField("column.6").value;
        var v8 = +getField("column.7").value;
        // Calculate the result and set this field value
        event.value = (v1 + v2 + v3 + v4 + v5 + v6 + v7) / the number of fields that were filled in;
    I'm pretty new to javascript. Any help would be greatly appreciated! THANKS

    First, I woul write this function withou field references to make it more universial, and then I would make it a document level funcion so it could be used more than once in a PDF and easily brought into another PDF.
    function Avg() {
    // computer average of non-empty passed field names
    var sum = 0; // sum of fields
    var count = 0; // counter for non-blank fields
    for(i = 0; i < arguments.length; i++) {
    var iField = arguments[i]; // get the i element from passed arguments
    var fField = this.getField(arguments[i]).value;
    if(!(isNaN(fField)) ) {
    // field is a number
    if(fField.toString() != '') {
    // field is not null or blank
    sum += Number(fField); // add to sum
    count++; // increment count
    } // end not blank
    } // end number
    } // end loop through arguments
    if(count != 0) {
    // compute average if there is one or more items to average
    return sum / count; // return average
    } else {
    return '';
    } // end no average computed
    } // end Avg function
    Your custom calculation script then becomes:
    event.value = Avg('column.0', 'column.1', 'column.2', 'column.3', 'column.4', 'column.5', 'column.6', 'column.7');

  • How do calculate the average of a group of percentages excluding percentages listed as zero on Numbers?

    Hey all
    This is driving me crazy!
    I need to calculate the average of a group of percentages excluding cells listed as '0%'.
    Please see screen print below, numbers highlighted need to be averaged, when the table is filled out correctly some will remain '0%' whilst others will have a value, I want the average to be calculated only using numbers with a value greater than '0'.
    FYI I am looking for the result to display in 'X2'
    Thanks :-)

    you can use the averageif() function. Here is a simple example to get you started:
    In this example the average if() function averages values that are non-zero
    C2=AVERAGEIF(A1:E1,"<>0",A1:E1)
    this is shorthand for select cell C2, then type (or copy and paste from here) the formula:
    =AVERAGEIF(A1:E1,"<>0",A1:E1)

  • How do i calculate the scrollpane value

    hi all, how do i calculate the scrollpane value dynamically?
    thanks a lot

    hi sorry for the lousy information, because i was in the hurry.
    hm... should be describe in this way, in VB i know how to get the value of scrollbar when the scrollbar being scroll, but i do not know how to done it in JAVA.
    i have my sample code as following:
            sp.addComponentListener(new ComponentAdapter() {
                public void scrolled(ComponentEvent evt) {
                    width = getWidth();
                    height = getHeight();
            });any idea? izzit correct? it just show nothing while i use to print at console

  • How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amo

    How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0

    Hi,
    Is your formula attached to basic salary element or some other element? You need to make sure that basic salary element has some value and is processed before this formula is called. Are you able to see value for basic salary element after payroll run?
    Regards,
    Pawan

  • 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

  • Looking for answers on XMP files - where should they be stored as sidecar files?  With the original raw file or in a separate folder?

    Looking for answers on XMP files - where should they be stored as sidecar files?  With the original raw file or in a separate folder?
    Relatively new user of Adobe LR5 and PS CC, about a year old. 
    If they should be stored somewhere beside the folder that contains the originals, where and how to change the settings?
    If I choose to write metadata to the original files, is that sidecar files or does the XMP file show separately?
    To be honest, I usually find a video and I cannot figure this out.  I have never received an answer on any of my questions by the way. 

    Hi there,
    You answered a prior question from me so I wanted to reach out to you about this.   I just need a step by step on how, if possible, to View LRCC on my MacBookPro when the main interface is on my iMac

  • I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly app

    I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly appreciated.

    Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
    var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
    var subtotal=0;
    for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
    nfSubtotal.rawVlaue=subtotal;

  • Will going from Reader 3.1 to 5 cause loss of any files stored as PDF files done with 3.1?

    Presently use Firefox Reader v. 3.1.4. Many files on my desk computer, operating on XP Pro, are stored in PDF files done with the 3.1.4 version. If I up date to the new 5.0 will these old files still open? Or will they be lost?
    Worse case if FireFox Reader was to be removed from my computer what happens to these older files that were saved using Firefox Reader 3.1.4?
    I am not experiencing any problems now, but the above questions are a concern, especially as this old computer continues to age.
    Thanks very much,
    steelblue
    [email protected]

    Hi, thanks for the very quick reply, although it doesn't really answer my question. As for not finding a Fire Fox Reader vr. 5 you should go to this link.
    http://download.cnet.com/Foxit-Reader/3000-10743_4-10313206.html
    I'd appreciate any comments you have about this PDF reader in regard to my original question.
    It all could be a mute point, mush like changing versions of Adobe, nothing seems to be lost or changed in the saved pdf files when changing versions in Adobe. Possibly Fire Fox 5 operates the same.

Maybe you are looking for

  • Weird behavior in baseline date in MIR4

    Dear Expert, Using MIR4, I try to change the payment terms, the baseline date will automatically changed to system date, which is not following the rules on the payment terms setting. I have done a debug on this, and this process is executed somewher

  • How to find which authentication used to site collection and site using powershell

    Hi, How to find  how-many web app, sitecollection, site used Windows authentication,claim authentication and classic, secure store authention , adfs authentication using powershell code in sharepoint 2013. If sites are used adfs authentication how to

  • Photoshop CC Not saving properly

    Ok, I have tested this with a few different computers that all have the latest update of Photoshop CC and they all do it... When you have a photo open and you go to Save As, if you hit enter (which should save it), the dialog box drops you into a sub

  • Create Parameter Transaction.

    Hi, need some help, I am creating an Parameter Transaction to create display only view for an Table. But I need to restrict only certain fields for selection, but by default system is prompting to select Selection fields. thanks Lakhbir

  • Invoke Java app from Oracle DB?

    Hi I wrote simple Java app I would like to deploy this class to Oracle DB server and to schedule execution, for example, every hour. I wonder how to do that. Nenad