Take the minimum value for table data

I'm storing test data in a table, with the hope that I can output the minimum value of the data. So far, I have used the table of max/min but can't make it work how I want. The test runs continuously in a loop of the holder. I get the minimum values in the table, but I would like to change the number of samples that the table contains, before it generates a minimum. The other option is that I run the test for a period of time (e.g. 3 seconds) and the table stores the data for this time then output 1 minimum value for the entire period.

My current configuration VI is attached.

Very appreciated

Chris

The size of the array in your VI is determined by the number of samples that you collect in your DAQ assistant, who is now 100 samples.  Never more, never less.

How many samples do you want before you determine the minimum?

Maybe what you really want to do is to build the table in the while loop and store it in a shift register, and when the loop has repeated enough times, then you take the minimum of built table.

Tags: NI Software

Similar Questions

  • What is the minimum value for the data type double?

    ... a more academic question: what is the minimum value of the data type double? I thought 'double', it is the 8-byte IEEE standard and what I remember, it's + - 1.7E + - 308.  The more different number of 0 should be 1.797E - 308.

    This is why I was a little surprised when I looked at the data output of my calculation of CVI, where I found the numbers with exponents of E-319 or E-324 as the smallest value...

    But I'm sure there's an explanation :-)

    Thank you for sharing with me,

    Wolfgang

    The largest number is indeed the order of + 1.7E + 308; There are a smaller number of - 1.7E + 308. Note that this is in fact the most negative number, which is the smallest by some reckoning. For the small beach of the Exhibitor, things get a little more complicated. 1E-308 can be represented with complete accuracy and resolution, but if you're willing to lose a few bits of precision, you can go down even further. For example:

    Double x, y, z:

    x = 1E-300;

    y = 1E7;

    z = x / y;               Give 1.000000000000000E - 307

    y = 1E8;

    z = x / y;               Give 9.999999999999999E - 309

    y = 1E18;

    z = x / y;               Give 9.999987484955998E - 319

    y = 1E23;

    z = x / y;               Give 9.881312916824931E - 324

    So, as you can see, values less than 1E-308 are possible, but they become increasingly more inaccurate and should not be relied upon.

    JR

  • SQL - find the minimum value for each separate record...

    Hi all

    I have a table like this in SQL Server

    Date of sale of product
    A date
    A date
    A date
    B date of
    B date of
    C date
    C date
    C date

    I would like to write a query to find the minimum date (i.e. the date
    the first sale) for each product

    Thus, the expected results would be

    Date of sale of product
    A date min
    B date of min
    C date of min

    How can I do this using SQL Server?

    any help is greatly appreciated!

    Thank you!

    Product SELECTION, MIN (sale_date)
    From your_table
    GROUP BY product

    Etienne

  • Determine the maximum value and the minimum value for each value in the 2D array

    Hello, I need help please. Sorry my English is not very good. I have table 2D in which each value describes a waveform, I needed a time interval to determine the minimum and maximum value of each element of the array.


  • How to set the minimum value for the division based on the metric of Super?

    I want to create the Super metrics include:

    (Data reading KB store / writing KB) * 100

    To get an understanding of the relationship between reads and writes.   However, this equation will always climb 0 if a number is 0.

    Is there a way to say "if read = 0 then read = 1 ' so that the equation will not evaluate to 0?

    Thank you

    -MattG

    There is no 'if' statement... but thought that you can add a (metric + 0.0001) which should not be 0

  • Select the lines with the maximum value for a date where another column is different from 0

    Hello

    I need to write a query on a table (called DEPRECIATION) that returns only the rows whose date maximum (PERENDDAT_0 column) for a specific record (identified by AASREF_0), and where the other column in the table called DPRBAS_0 is different from 0.

    If DPRBAS_0 is equal to 0 in all the lines of a specific record, then return the line with date maximum (PERENDDAT_0 column).

    To be clearer, I give the following example:

    Suppose we have the following data in the table of DEPRECIATION:

    AASREF_0 PERENDDAT_0 DPRBAS_0
    I2011001074331/12/20150
    I2011001074331/12/20140
    I2011001074331/12/20130
    I2011001085612/31/20160
    I2011001085631/12/20150
    I2011001085631/12/2014332
    I2014001223812/31/2016445
    I2014001223831/12/2015445
    I2014001223831/12/20140

    The query must return only the following lines:

    AASREF_0 PERENDDAT_0 DPRBAS_0
    I2011001074331/12/20150
    I2011001085631/12/2014332
    I2014001223812/31/2016445

    Thanks a lot for your help!

    This message was edited by: egk

    Hello Egk,

    The following query works for you.

    SELECT AASREF_0, PERENDDAT_0, DPRBAS_0

    FROM (SELECT AASREF_0,

    PERENDDAT_0,

    DPRBAS_0,

    ROW_NUMBER)

    DURING)

    AASREF_0 PARTITION

    ORDER BY

    CASE WHEN DPRBAS_0 <> 0 THEN 1 OTHER 0 END DESC,.

    PERENDDAT_0 DESC)

    RN

    DEPRECIATIONS)

    WHERE rn = 1

  • How to get the empty values for common data for a column?

    Hello
    I have a table whose data is like this:
    DEPT_ID     STATUS     USER_ID     ART_ID
    
    7     R     1234     0000001
    7     P     2411     0000002
    7     Q     1231     0000003
    7     S     7676     0000004
    3     R     6776     0000005
    3     S     7869     0000006
    6     Q     787     0000007
    6     W     5656     0000008
    .......more data like this
    How can we get this are data in this format:
    7     R     1234     0000001
         P     2411     0000002
         Q     1231     0000003
         S     7676     0000004
    3     R     6776     0000005
         S     7869     0000006
    6     Q     787     0000007
         W     5656     0000008

    In SQL * Plus, you can use the PAUSE command

    SQL> break on deptno;
    SQL> ed
    Wrote file afiedt.buf
    
      1  select deptno, ename
      2    from emp
      3*  order by deptno
    SQL> /
    
        DEPTNO ENAME
    ---------- ----------
            10 CLARK
               MILLER
               KING
            20 FORD
               smith
               ADAMS
               SCOTT
               JONES
            30 SM0
               TURNER
               BLAKE
               MARTIN
               ALLEN
               WARD
               PAV
               BAR
    
    16 rows selected.
    

    In SQL, you must use an analytic function

    SQL> ed
    Wrote file afiedt.buf
    
      1  select (case when deptno = prior_deptno
      2               then null
      3               else deptno
      4            end) deptno,
      5         ename
      6    from (select deptno,
      7                 lag(deptno) over (order by deptno, ename) prior_deptno,
      8                 ename
      9            from emp
     10*          order by deptno, ename)
    SQL> /
    
        DEPTNO ENAME
    ---------- ----------
            10 CLARK
               KING
               MILLER
            20 ADAMS
               FORD
               JONES
               SCOTT
               smith
            30 ALLEN
               BLAKE
               MARTIN
               SM0
               TURNER
               WARD
               BAR
               PAV
    
    16 rows selected.
    

    Justin

  • How to get all minimum values for a table of valuable documents?

    I need to get the list of records of the minimum value for a table that has the structure and the data below
    create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
    
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
    commit;
    
    
    SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
    SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
    GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
    HAVING COUNT(*) >1) min_query
    WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
    AND min_query.salary = e.salary
    group by (e.name,e.org,e.desig);
    With the above query, I can get the year less value where the EMP has maximum salary. It returns a single record. But I want all the records that are minimal compared to the value of the year max

    Power required
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007
    Please help me with this...

    Hello

    Aggregate functions reduce the result set with one row per group.
    Almost all of the aggregate functions are homologous analytics that can give the same results without restricting the result set. Since you want the output to contain several lines per group, then the analytic functions are probably better for you.

    Here's one way:

    WITH      got_analytics     AS
    (
         SELECT     name, org, desig, salary, year
         ,     MAX (salary)  OVER ( PARTITION BY  name, org, desig)          AS max_salARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  name, org, desig, salary
                                    ORDER BY        year  DESC
                           )                              AS year_num
         FROM    emp
    )
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     year_num     > 1
    ;
    
  • Filter for table data, the range of data obtained and defined 2D

    I produce data of an ultrasonic sensor at 1 K Hz, and there is a lot of data (data points range of 0 to 10). However, in some cases when I know that the data should be about 7 (for example) I get outliers (about 9 and 10). Is it possible to define a filter for data in the defined range.

    I averaged the data to get an average value, and outliers are distorting. In the worst case, my outliers are 30 to 40% of the data generated. I created a filter to sort the data and, taken from the lowest value. I stop the loop when data reaches a value greater then 9. But this seems to take a long time (because the loop checks for each data point and there are 1000s of them).

    Is there a better way to filter data and define a predefined table range to collect?

    I enclose my filter.vi... and a set of samples of my previous data. The ranges of data of 10-8 and would like to have the range 7.5 to 8.5 to consider. The sensor records tension here and the problem can be solved by installing a different type of sensor, but if a filter in LabView can due it, the sensor that we use now is absolute.

    I am in kind of emergency, my design in unfinished because of this problem, if someone can find some time to share some suggestions, I will be grateful.

    Thanks in advance.

    See attachment.  I have incorporated the data you've posted in the vi.  It doesn't seem like any data were less than 8.7 or so, so I modified the scope so it would be a few points on average.  Some games were completely out of reach while the average came back like NaN (not a number) due to a division by zero.

  • Find the minimum value of the table in time...

    Firstly that it is not "find the min value in the table.

    It is:

    I have a table that changes its values at each iteration, and I want to compare the new values with previous values and make a new array with the minimum values...

    In C++, it would be like this:

    int main() {}

    int array [8];

    int min [8];

    int i;

    for (i = 0; i<>

    min [i] = 1000000; Initialize minimum table with a high value

    }

    {while (1)}

    Array = update_array ();

    for (i = 0; i<>

    If (array [i]<>

    min [i] = array [i];

    }

    }

    do things...

    }

    return 0;

    }

    IM new to labview and it always confuses me a lot...

    Thanks in advance.

    Using the function Max & Min regular (not table Max & min as you know) with tables and a good will of employment registry change.  Max Min &, as most of the digital functions, is polymorphic and works witt tables as well as scalars.

    Lynn

  • The default value for a property with data of type boolean

    Hi all

    Is it a system preference setting, where the default value for a property with data of type boolean can be a Virgin? I want to keep the value by default in a vacuum, but every time I save the property even after empty selection, the default value changes to FALSE.

    Capture.JPG

    In this case Boolean doesn't help you, you mayneed to create a chain of ownership and have true/false / "" as your list of values

  • PL/SQL loop to find the minimum value

    I want to find the minimum value from a table using the pl/sql loop

    I have data format below.

    1 ABC 2

    1 ABC 20

    1 ABC 500

    1 ABC 2000

    XYZ 2 250

    JKL 3 300

    MNP 3 350

    3 KLM 400

    I wrote the code below. His does not work. Please suggest.

    Set serveroutput on
    declare
    x number: = 3;
    y VARCHAR2 (3): = 'ABC ';
    fmin number: = 0;
    number of Fmax: = 0;
    Start
    for rec in (select sal from test
    where id = name and x = y) loop


    If rec.sal > fmin then
    fmin: = rec.sal;
    on the other
    FMAX: = rec.sal;
    fmin: = fmax.
    end if;
    end loop;
    dbms_output.put_line (Fmax);
    end;
    /

    I want to output 2 on top of code.

    Thanks in advance

    Why PL/SQL? SELECT MIN (SAL) OF TEST will be more rapid and much less coding. In any case:

    declare

    number of v_min_sal;

    Start

    for v_rec in a loop (select sal from emp)

    If nvl (v_min_sal, v_rec.sal + 1) > v_rec.sal

    then

    v_min_sal: = v_rec.sal;

    end if;

    end loop;

    dbms_output.put_line (' lowest salaray is "' |") v_min_sal | '"');

    end;

    /

    The lowest Salaray is "800".

    PL/SQL procedure successfully completed.

    SQL >

    SY.

  • SQL-MIN() don't not returns the minimum value

    This is my code;

    $SQLx = "SELECT MIN (price_from) AS minimumprice FROM AN_pricetable WHERE accomm_id =". "." $db_field ["accomm_id"];

    $resultx = mysql_query ($SQLx);

    $pricefrom = mysql_result ($resultx, $i, 'minimumprice');

    If ($pricefrom == 0) {}

    $pricefrom = 'TBC' ;}

    But for some reason, it is not the minimum value "price_from". For example, several rows in the table have the same "accomm_id", and their values in the field 'price_from' are: 8, 12, 50-7, but the SQL code returns the MIN 12. What I'm doing wrong here?

    Thank you

    What is the data type of price_from?  If it is a type of string (char), then 12 would be the lowest value.

  • Best way to set the default values for the form elements

    Hello

    I have a form with a lot of defaults that is mentioned below...
      Field                      value  
      created by             :APPL_USER
      creation_date         SYSDATE
      last_updated_by     :APPL_USER
      last_update_date    SYSDATE
      item1                     value1
      item2                     value2
    I am currently using calculation-> after presents... then when we create/update a record... these computaion takes place and the default value for the inserted values get... THIS WORKS PERFECTLY WELL.

    I want to know... If this approach is fine OR we can have a better approach to achieve...?

    Thank you
    Deepak

    Hello

    I think it's good if it fits your need.

    But why you have these fields in the form?
    created by: APPL_USER
    CREATION_DATE SYSDATE
    last_updated_by: APPL_USER
    last_update_date SYSDATE

    The user can enter the ones?
    I thought that those who are to audit and I would fill those drop with trigger in the database.
    So that you get the same "correct" values if you need to manipulate the data with example of sql client

    BR, Jari

  • Error when setting the minimum value of entry number Spin Box...

    Hai
    I drag and drop a VO and created a table. In this table, I cast a column that contains an InputText field to entry number Spin Box. During loading of the page, the table retrieves data from the database and display of numerical values in the SpinBox.After who, when I scroll the table through vertical scroll bar, the table * "data extract" * and error began as * "the value must be the number" *... In the original Version, this attribute is a number.
    THIS ERROR will PRODUCT ONLY when I put the minimum value of the counter... The purpose of minimum value, I want only the user to select the value of ve only... How can I prevent the user to select only values of ve... ? (IE, * how to set the minimum value of counter?) *

    Try changing the data type of your attribute in the EO to be Double instead of number.

Maybe you are looking for