Count the number of rising edges in table 1 d

Hello

I wanted to measure the frequency of a pulse signal using a MCC DAQ via libraries ULx in Labview. I have two methods to do this:

1. use the analog inputs:

Since data acquisition has only 1 ADC, I use a commune VI acquisition for all channels and create a multi-dimensional array with different channels in rows 0-15. Then divide them by using the function "Array Index".  I think this split removes the parameter 'time' to the wave, since it is now a table 1 d. But I already know that there will be 1000 samples each 100 m everything I want to do now is to count rising edges using a function and divide it by the 0.1 to obtain the frequency in Hz, but I don't know how. Can anyone help?

2. use the input frequency meter:

Because I can't use the DAQ assistant, I have to use the CI frequency-> counter 1ChanNSamp DBL 1 d in the ULx library. There is no reference to take aid to and I do not know if this method is good. I have no way of knowing since I do not have a signal generator. In addition, it does not work so far.

Help, please.

Thank you!

Thank you.

I note in your first post it is seems to want to get readings of speed about 10 times per second. To get a resolution of 1 Hz frequency direct count you need to get at least 2500 counts in a range of counting at the highest frequency. This means that you need to have at least a second. Measures of the time are another option.

Some preliminary calculations:

Period at 2500 RPM = 2500 Hz is 400,000 Americans.

Period at 2499 RPM = 2499 Hz is 400,160 to the United States.

You need to be able to resolve a difference of 160 ns period. To do this directly requires 6.25 MHz sampling rate.  It is 25 times faster that your DAQ card can enjoy.

What other options are there? Consider only your Information.vi extract. He uses techniques of Fourier transformation and interpolation to find the frequency of a signal. I set up a quick test VI to check this. Using a sampling rate of 10 kech. / s and 1000 samples per read (10 reads per second), it has easily resolution of less than 0.1 Hz at both ends of the range of speed and largely independent of the amplitude.  This is the way to go.

Lynn

Tags: NI Software

Similar Questions

  • Count the number of rows in a table (s)

    Hi all

    I have a TKT_PRIORITY_LK table that I want to count the number of rows returned by a priority level... say Low, Medium, High, critical. I want to be able to count how many of each created are they, instead returning ID instead, if making any sense... Can you please help with this.

    Example; Select count (*) in TKT_PRIORITY_LK

    PRIORITY group

    Kind regards

    Sandrine

    Try this

    Select a.PRIORITY, count (*) from TKT_PRIORITY_LK a, TKT_TICKET_MAIN b

    where a.id = b.PRIORITY_ID

    A.PRIORITY group

  • Count the number of rows in each table

    I have a list of table names, how to write a query to find out the number of rows in each table.

    Select the table table_name from all_tables where owner = 'XXX' and num_row > 100
    or
    Select the table table_name from all_tables where owner = 'XXX' and sample_size > 100


    isn't quite working.
    Why?

    Thanks in advance,

    Published by: mpt_fz on January 12, 2010 12:06

    In recent versions of the db (11g):

    SQL> select table_name, column_value cnt
      from user_tables, xmltable (('count(ora:view("'||table_name||'"))'))
    where table_name in ('EMP', 'DEPT', 'BONUS')
    /
    TABLE_NAME                     CNT
    ------------------------------ -----
    BONUS                          0
    DEPT                           5
    EMP                            14   
    
  • Count the number of rows in a table

    Hello

    I have a requirement. I want to frame a SQL, which takes the name of schema as input and returns the tables belonging to this scheme and the number of lines in a particular table.

    An example of output:
    ===========
    Table            No. of Rows
    ~~~~          ~~~~~~~~
    A                    123
    B                    126
    C                    234
    . 
    .
    .
    Can someone help me to make a request for the same.

    Kind regards

    If you are not sure on the statistics collected, then you need dynamic sql...

    DECLARE
         VNUM NUMBER:=0;
         VSQL VARCHAR2(4000);
            vcount number := 0;
    BEGIN
         DBMS_OUTPUT.ENABLE(NULL);
         DBMS_OUTPUT.PUT_LINE(RPAD('TABLE NAME',30,' ')||' '||RPAD('ROW COUNT',10,' '));
         DBMS_OUTPUT.PUT_LINE(RPAD('-',30,'-')||' '||RPAD('-',10,'-'));
         FOR C1 IN (SELECT TABLE_NAME,OWNER FROM ALL_TABLES WHERE OWNER='SCOTT' ORDER BY OWNER,TABLE_NAME) LOOP
              VSQL := 'SELECT COUNT(*) FROM '||C1.OWNER||'.'||C1.TABLE_NAME;
              EXECUTE IMMEDIATE VSQL INTO VNUM;
              DBMS_OUTPUT.PUT_LINE(RPAD(C1.TABLE_NAME,30,' ')||' '||RPAD(VNUM,10,' '));
                    vcount := vcount +1;
         END LOOP;
            DBMS_OUTPUT.PUT_LINE(RPAD('-',length(vcount)+6,'-'));
            DBMS_OUTPUT.PUT_LINE(vcount||' Rows.');
            DBMS_OUTPUT.PUT_LINE(RPAD('-',length(vcount)+6,'-'));
    END;
    /
    TABLE NAME                     ROW COUNT
    ------------------------------ ----------
    BONUS                          0
    DEPT                           4
    EMP                            14
    SALGRADE                       5
    -------
    4 Rows.
    -------
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.44
    

    Personally, I think this is a time to kill the process... ;)

    HTH,
    Prazy

  • Count the number of records in all tables with a querry URGENT please...

    I downloaded ORACLE 9I DATA DUMP in my computer. There are number of tables. I need to know the tables with records more of say 100 or on the go. Is it possible... If so kindly let me know.

    Second, the database that I downloaded, I discovered that Audit_ trial was not activated by cooking
    ' select name, value of v$ parameter.
    where name like '% verification' and it turned out to be false.
    Can we assume that the database in the server as the audit_trial has been disabled...

    Published by: user1287492 on October 21, 2009 09:07

    Hello

    Place the table name with quotes. Maybe that's the problem.

    Try this code

    select table_name,
     to_number(
     extractvalue(
     xmltype(
     dbms_xmlgen.getxml('select count (*) c from "'||table_name||'"' ))
     ,'/ROWSET/ROW/C')) COUNT
     FROM USER_TABLES
     where iot_type IS NULL
    /
    

    SS

  • count the number of occurrence in the table with toplink

    Hello!

    There is no way to create a query with the expressionbuilder or... to count the number of occurences in my table?
    I don't want to use the query " select count (*) from table .

    Thank you

    Not sure about the question. You are looking to get the SQL "select count (*) table" to use the framework of expression TopLink or pull you that SQL already and want something else?

    If you are looking just to get the count of a table/class, you can use a ReportQuery:
    ReportQuery rquery = new ReportQuery (ClassToQueryOn.class);
    rquery.addCount (); equivalent to count (*);

    session.executeQuery (rquery);

    You can use a report query to return data instead of objects and use the criteria for selection as a normal read request.

    Best regards
    Chris

  • Count the number of lines

    I'm continuing OIC to interact with php where I counts the number of errors of multiple table but it gives me error for example $ress = array ();                      $numrow = oci_fetch_all ($ss, $ress, null, null, OCI_FETCHSTATEMENT_BY_ROW);

    you use he or she pursues? I would be careful in taking legal actions against the SPOUT... Sorry, couldn't resist.

    Regarding your problem: do you have an Oracle error message - and one which?

  • Try to count the number of records where some columns are met

    Using SQL in Toad against an Oracle table, I'm trying to count the number of records in a table where some columns are filled. For
    example, I need to know the total number of records from a table where

    ln_stop_cd is not null - 65000 records
    ln_process_cd is <>- 25000 0 records
    ln_opt_cd is not null - 7500 records

    and the record_type = "A".

    I know that the total individual records as described above. However, I do not know how
    the SQL to show for record_type = 'A' the total count is 97500 records. Any help would be
    appreciated.

    Hello

    It seems that the problem is that the indictment may overlap; You can count the same rank 0, 1, 2 or 3 times, depending on whether 0, 1, 2 or 3 of these 3 independent conditions are met.

    Try something like this:

    SELECT     COUNT (in_stop_cd)
          + COUNT (CASE WHEN in_process_cd  != 0        THEN 1 END)     -- this site doesn't like the other inequality operator
          + COUNT (in_opt_cd)        AS grand_total
    FROM    table1
    WHERE     dt          >= TO_DATE ('01-JUN-2011', 'DD-MON-YYYY')
    AND     dt          <  TO_DATE ('02-JUN-2011', 'DD-MON-YYYY')
    AND     record_type       = 'A'
    ;
    

    You want to make charges without making 3 assists separated through the table. The problem is the 3 original requests had slightly different WHERE clauses.
    Put these conditions in the WHERE clause and make other conditions apply only to the individual counties, either with a column instead of *, or using a CASE statement that contains the condition that applies only to the column.

    Also, the date is not a column name good. Do not compare the DATEs to strings. If your column is really a DATE and you want to ignore the hours, the minutes and seconds, then the best way is to compare the column with 2 other DATES, as shown above. It's more coding, but it is more efficient and more reliable.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    You don't have to display a large amount of data. You can probably give an excellent example of this problem with only 5 or 10 rows of sample data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

    Published by: Frank Kulash, August 4, 2011 11:27

  • How to count the number of edges using counters SMU-6363

    Hello

    I'm counting the number of edges in a test signal in a duration of 50 Ms I use the SMU-6363 map and connect to the TRC test signals 0 SRC (PFI 8). Is that a correct connection? What else do I need hardware wise be a correct set for this application?

    Thank you

    Jeet

    Hi Jeet,

    This configuration is correct. Hardware wise, that's all you need to do.

    Kind regards

    Jorge Fernandez
    Technical sales engineer
    National Instruments
    ____________________________________________
    Certified LabVIEW Associate Developer (CLAD)

  • How to count the number of columns in an oracle table using sql

    How to count the number of columns in an oracle table using sql

    You must put the name of the table in capital letters

    As

    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = 'EMP';
    
    or
    
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = UPPER('Emp');
    

    Concerning
    Arun

  • Is it possible to do it in a table? (Count the number of days from a certain date)

    Hello

    I did yesterday a data base to make my job easier. I could make it even more effective if I could understand this delicate piece of business.

    What I have is in my table has a column called "Date completed". This column contains the date when the project was completed. Then, I would like to have another column in the table called "number of days elapsed since completion. This column would have simply taken the date in column "Date completed" and count the number of days since that day and show them in a numeric value (i.e. 28). This way I could do a select and display everything is over for a number of days where I need complete my report (s).

    Thanks for any help. If you know a way to do that is completely different from what I'm trying to please do not hesitate to propose a solution, I'm a complete newbie to this. I took a basic SQL course at the College a few years ago, but never learned to do anything as advanced as this.

    Thanks again

    Your number of days can be easily calculated as trunc (sysdate) - date you completed column.

    You probably don't want to store the number of days in the table (since his will change daily)-instead it calculate on the fly that you query the data (or if you have 11 g you could watch the virtual to make columns persistent calculation rather than the value in the table).

  • How to count the number of conditionally highlight cells in a column or row

    I'm working on a table to identify problems with my credit rating. So, I have a column that indicates the due date on the invoice and G that contains the date to which I made the payment.

    I'm trying to follow how many times I'm late with payments. I want to improve.

    So if the G column is later than column D, both with the Date formatting. So, now I've highlighted cells and I want to summarize for the year, how many times I was late payments.

    I thought a column G to count the number of days before or after that back I was with payments. But if the sum, it only gives me no useful information. I guess I could count the number of cells with values less than 0.

    I prefer to be able to put in the summary column for G something that said 0-12 years ago has highlighted cells in the column.

    Thank you

    You can not count based on sharing or formatting.  You can, however, be based on the same conditions.

    There are functions:

    COUNTIF() counties based on a condition is true

    and

    COUNTIFS() based on several conditions being true

    = NB. If

    Here is a way.  IT will take an additional column that calculates the "delay" in the days of a payment

    the first two lines are the lines of header

    H3 = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    It's shorthand dethrone select cell H3, and type (or copy and paste it here) the formula:

    = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    Now select cell H3, copy

    Select the H3 cells at the end of column H, dough

    H1 = "payments late =" & COUNTIF(H,">0")

  • Count the number of zero terms between non zero terms

    Hello.  I have a table of data of zero and nonzero (example: {1 2 56 2 3 0 0 0 0 0 2 3 5 2 3 5 2 0 0 0 0 32 43}) I need to count the number of zeros of each string of zeros and mark that number against the first zero no term following the string of zeros (NOTE (: string is used here as a description of a series of zeros, not a string variable).  So the plot which coordinates since my example would be (5.2) and (4.32).

    I'm clear on the way to the path, but I am unable to store only each final count of consecutive zeros without having unnecessary data in my plot.

    Thanks in advance to all those who have advice!

    -Mike

    Do something like that?

    EDIT: Minor Correction because of the additional function of decrement.

  • Count the number of 1 is present in digital waveforms obtained by converting the pulse signals.

    Hello

    I use Analogtodigital.Vi to convert the pulse of the sequences in digital.signals.I am able to get the representation of digital waveforms of impulses.

    But how to count the number of 1 is present in the converted digital waveform. I want to count the number of 1 is present in the digital waveform converted.

    Thanks in advance.

    Have you tried the block scheme of similar to the Digital.vi of opening?

    It creates an array 2D uncompressed 1 and 0, which is the binary 16 bits A/D conversion of each element in the array Y of the input waveform. You can use the DWDT digital Array.vi Boolean to convert a 2D Boolean table. Then convert Boolean values to 1.0 and summarize the array of integers. The sum must be the number of 1 bits in the digital waveforms.

    Lynn

    Note: The VI attached is saved in version 8.6. When I have it saved for the previous Version a warning was generated about the possible differences in the versions. Let me know if it doesn't work, and you are using which version of LV.

  • count the number of repetitions of items

    I want to count the number of repetitions in column 2, which correspond to each of the categories in column 1 in table. Rehearsals in col 2 should be the same issue, so I would get the representatives by category and item.
    Can someone help me please?
    Thanks in advance.


Maybe you are looking for