Take the time between two values

Hi people,

I have a problem and I know idea how to solve... I need help.

The problem is I want to take the time between two values max as you can see in the chart.

For example, in the image that I have add

4.5 - 1 840 = 2.66

And enter this value in the 'time between mostra '.

It's that I want...

But what I think is very complicated, because I don't know how to take the time correctly and does remove...

Thank you very much

Any solution?

Hi jocuma,

I tried something and hope that helps u.

Just create two arrays of temperature and voltage. First of all, I'll get the value of the voltage when it is more of a certain value and that same index to get the value of time and store in the shift register.

When I get the second higher than the limit value, I'll get time and subtract the previous value.

Tags: NI Software

Similar Questions

  • Measure the time between two digital pulse

    Hello

    For a non-critical calendar application, I need to measure the time interval between consecutive TTL pulses, ranging from the order of 0.5 s for a few seconds, with a low accuracy of +/-10-50ms. The interval being measured varies between the rising edge of the first pulse and the front of the next and so on.

    I have several input lines I need to deal with. Because it's a critical machination low cost, I don't want to use digital counters for each line, so I work with an acquisition of data USB6008 and have connected the input rows TTL on the digital inputs of the device. Avoiding will be sufficient.

    I found a good example of VI on discussion forums that does almost the same thing, only it uses instead of the DAQ Assistant user input. The VI works including the time the program going on in a while loop. I replaced with the DAQ Assistant output (a channel) user input in the hope that it is still work.

    When I run the program in "run once" mode, it seems to work perfectly. However, in "continuous run" it measures only a very small interval, probably just the time between two samples.  I think it has something to do with the help of a while loop in combination with the DAQ Assistant. Anyone who has any suggestions how to solve this problem?

    Thank you!

    OK... first of all, you should never use the button "run continuously.  I wish that NEITHER would be to eliminate it, but told me that it is sometimes useful for debugging.  If you want your program to run over and over again, use a while loop with a stop"" button.

    If I'm reading your code correctly, you make your initial moment, and then collect data from data acquisition.  When one of the channels is "T", you stop your loop and the end time of capture.  (By the way, why you convert your table to a cluster?  Why not just index the appropriate channel in the table directly?)

    Since you want to capture the time between two consecutive pulses, you need to know when a transition has occurred... i. e when your digital line went from F (no pulse) to T (pulse start).  This will give you your forehead.  Right now, all you're doing is looking for a value T - so you have no way of knowing if you are looking for to the previous impulse again, or a new impetus.  You also burn 100% of your processor with the way you have your programme in place.

    You need a small loop delay so that your VI is not 100% of your hogs CPU time.  Given that you can live with an accuracy of 50msec, what I suggest that you use.

    See attached picture for you give an idea of how to implement.  He will probably need some refining operations, but it should point you in the right direction.

    I hope this helps.

  • How to find the time between two channels of entry in the data acquisition card or pci 6036

    Hello

    I read a lot-related posts on the simultaneous measurement of two input voltage of similar channels in map data acquisition. I know that the best material is "simultaneous measurments of the Series DAQ cards" but I only pci data acquisition card 6036 and I try to understand what is the time between the reading of the two channels . This period is always constant? (must it rely on a voltage (amplitude, frequency, waveform..). I send the sine wave (s) to the two channels and read the values of V, if they read the same value, the difference should always be zero but I get-0,002 to 0.002 Volt difference (I must find a way to convert it in time). A screenshot of my VI is attached. I wonder how I can accurately measure the time delay between the channel.

    I am open to any suggestion, my final goal to read exactly two channels at the same time ((ou connaître le délai exact donc je peux correspondre les données correspondantes étant donné le temps de retard))

    Hi spinup,

    better you should post your question in the forum of LabVIEW, LabWindows/CVI is used

    Good luck.

  • Estimate the time between two computers

    Hello, everyone.

    I want to develop a program for communication between two ip addresses:

    IP1: 192.168.1.100

    IP2: 192.168.1.101

    Suppose IP1 is the server IP2 is the Viewer, then I want to put in place a program to estimate the elapsed time for IP1 contact IP2, but I don't know how to do.

    Also, I want to display the elapsed time for the connection (which varies due to fluctuations in the internet), performing actions such as continuously 'ping' the receiver from the server. Can someone show me the way to achieve this? Thank you very much.

    Best regards

    yukfai88

    Please do not shout

    How about using ping?

    Insert the output in an analysis of string to read the value you need. Sorry my OS is in German so you have to adapt ;-)

  • How can I measure the time between each two successive increase edges, using digital input?

    Hello

    I have tried two measure the time in seconds between each two successive rising edges on a digital input.

    So far I managed to detect the rising edge, increment a counter at each rising edge and take the time during which the increase is edge

    all I need now is subtract edge currently rising from the previous era of edge rising to calculate (T), which can be 1/frequency and display in real time for the user.

    but I do not know how to do this

    Can someone help me please!

    Woah!

    Sorry Apok, but your code becomes much too complicated and salty. I don't think that all records to offset or Boolean conversion/operators are necessary at all.

    If you want to measure the time between two keys so it's another (much less complicated) way. It simply records the time when press button in a registry change, then compares the two.

  • Dynamic action - Get the difference between two dates + times

    I have problems a little dynamic to work action. I'm trying to get the time between two dates with the time difference.

    Here is what I got (this is apex 4.0):

    Two date pickers + two numbers fields (date/start/end times)

    I created a dynamic action on the page who fires on the point lose focus (above points).

    The real action for the DA is the body of the PL/SQL function:
    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_char(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MON-YYYY HH:MIAM');
      end_date := to_char(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MON-YYYY HH:MIAM');
      :P1_HOURS := end_date-start_date;
    End;
    When I change the values on the page, I get the following error:

    AJAX call back Server error ORA-06502: PL/SQL: digital or value error: character number conversion error to set the value.

    I'm guessing that there is a problem with the date formatting, but I can't make it work. Thanks in advance!

    Hi djston,

    because you chose the dynamic action of 'Set value' with the "Body of the PL/SQL function" type you need to return the value. Try the following code

    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_date(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MM-YYYY HH:MIAM');
      end_date := to_date(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MM-YYYY HH:MIAM');
      RETURN (end_date-start_date)*24;
    End;
    

    and P1_REQUESTED_HOURS like 'item affected. "

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

    Published by: Patrick Wolf on January 17, 2011 10:54

  • Measure the time between the ridges of the periodic input signal

    We have built a circuit which is supposed to mimic an Exercycle.  We have an IR switch and a spinning wheel, the rccb meets a comparator circuit and the output of the element of comparison, we have running in LabView.  We successfully were able to measure the number of rotations of the wheel and the total distance travelled by the wheel, but are struggling to measure speed.  We cannot find a way to measure the time between picks in real time, which we could then divide the wheel circumference and calculate the speed in real time.  The VI I posted has a square wave simulated rather than the signal we receive on our circuit.  Thanks in advance for the help.

    Jon and David

    I think you're overloading the things trying to get the time between two pulses.  Instead, you can use the VI Express your measures and select frequency for her custom. Then, you can multiply the circumference of the wheel of the frequency to get the speed.

    I hope this helps.

    -Christina

  • Count the number of records between two values of keys (BTREE)

    How can I count the number of keys between two values?

    I use python driver and BTREE access method.

    = >

    Ideally, what I want is a set of whole time series data (intervals may change) to a given number of points on average. The keys are timestamps and the values are the data that it takes on average. I need to count the number of records between two timestamps so that I can divide this figure by the number of points I need and data on average. What is the best way to do it?  Or should I keep the timestamp constant intervals and use the RECNO access method?

    Thank you
    (first post btw... and why is there not a lot of people at stackoverflow that answering the questions of Berkeley DB?)

    BDB is an integrated db and there no internal counters or statistics you might grap to use for this.    You will have to do it manually.

    You can create a cursor, grap the records you want, whenever you get the next card that you bump a counter.

    If you are using RECNO, you can use a slider to obtain the number of registration (DB_GET_RECNO), and if all that you data is in

    sequentail records with no missing documents, you can find the total number of take the last rec #-original rec # + 1 to get a count.

    If you pass the SQL API, you can issue a SQL query to give you a count.  Select count (*) where...

    As you enter the data anyway, so better perhaps to count records as you go along.

    Thank you

    Mike

  • How can I measure the time between the two edges of successive increase, using digital input...

    Hello

    I'm trying to measure the time in seconds between each two successive rising edges on a digital input.

    So far I managed to detect the rising edge, increment a counter at each rising edge and take the time during which the increase is edge

    all I need now is subtract edge currently rising from the previous era of edge rising to calculate (T), which can be 1/frequency and display in real time for the user.

    but I do not know how to do this

    Can someone help me please!

    Note: while I am in a position varies between 200 ms - 2 seconds


  • Find the difference between two date and time

    Hi friends,

    I wanted to find the difference between two date and time, but my qury is slightest error "invalid number."

    select sql_step_num,proc_name,run_seqno,start_date,end_date,(to_char(start_date,'HH24-MI-SS') - to_char(end_date,'HH24-MI-SS') ) as ed  
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate) 
    order by sql_step_num;

    You try to get the feel between two char strings.
    And more difference between two dates gives a NUMBER of days.
    Try this:

    select sql_step_num,proc_name,run_seqno,start_date,end_date,numtodsinterval(end_date-start_date,'DAY') as ed
    from eval.EVAL_RUNTIME_DETAILS
    where trunc(start_date) = trunc(sysdate)
    order by sql_step_num;
    
  • Try to shorten the time between songs

    Original title: Media Player

    If I am using windows media player and create a list of songs to play how shorten the time between songs, so we can finish and the next songs will start immediately?

    Hey BillTolbert,

    Unortunately, there is no settings to do such things.

    It's common sense, the songs will be the next song to play won't take long to play.

    The next song begins to play as soon as the first finshes.

    Hopefully this should clarify your doubts.

    Good luck!!!

  • Take the difference of two tables

    Hello

    I have two tables where in I need to take the difference between the two columns of different tables and show as decimal below:

    Table A

    Name, salary

    x 10.5

    y - 10.32

    z 5

    Table B

    Name, salary

    x 10.5

    y - 10.32

    z 3

    a 12

    Output:

    Name_A, Name_B, salary, remarks

    x, x, 0, no diff

    y, y, 0, no diff

    z, z, 2 Diff is here

    , one, no data, no data from the previous

    Hello

    Try ythis:

    with table_a as
    (
    SELECT 'X' NAME, SALARY, 10.5 DUAL UNION ALL
    SELECT THE NAME OF 'Y',-10.32 SALARY OF DOUBLE UNION ALL
    SELECT THE NAME OF 'Z', 5 DOUBLE SALARY
    )
    table_B as
    (
    SELECT 'X' NAME, SALARY, 10.5 DUAL UNION ALL
    SELECT THE NAME OF 'Y',-10.32 SALARY OF DOUBLE UNION ALL
    SELECT THE NAME OF 'Z', 3 DOUBLE UNION ALL SALARIES
    SELECT 'A' NAME, SALARY 12 DUAL FROM
    )
    SELECT
    COALESCE(A.NAME,B.NAME) NAME
    , NVL (TO_CHAR (A.SALARY - B.SALARY), 'NO DATA') SALARY
    , CASE WHEN A.SALARY - B.SALARY = 0 THEN 'NO DIFFERENCE '.
    WHEN B.SID IS NULL, "NO DATA OF THE PREVIOUS.
    WHERE B.NAME IS NULL, "NO DATA FROM NEXT.
    ANOTHER 'DIFFERENCE IS THERE.
    END NOTE

    Of
    TABLE_A HAS
    TABLE_B FULL OUTER JOIN B ON (B.SID = B.NAME)
    ;

    NAME SALARY NOTE
    ---- ---------------------------------------- ---------------------
    X 0 NO DIFFERENCE
    Y 0 NO DIFFERENCE
    Z 2 THE DIFFERENCE IS THERE
    A NUMBER OF DATA NO DATA FROM THE PREVIOUS

    Kind regards

    Peter

  • Calculate the hours between two dates

    Hello

    I have a requirement to count the hours with 2 given timestamps, something like:
    SQL> select ((to_date('22-oct-2012 13:00:00','dd-mon-yyyy hh24:mi:ss') - to_date('20-oct-2012 13:00:00','dd-mon-yyyy hh24:mi:ss'))*24) B from dual ;
    
             B
    ----------
            48
    However, I wish it would be that simple. I just need to count the hours between two timestamps for the hours of work for example, 08:00 - 17:00, MONDAY to Friday (excluding weekends).
    So lets say I have to count the hours between two dates above the result should be 18 hours not 48 (4 hours on 20/oct, 9 hours on 21/oct to 5 hours 22/oct).
    How can I achieve this? Any idea will be useful.

    Thank you

    My query generates a list of all the hours between the start and end time, filters on the hours that are outside of the hours of work and then account for the remaining lines. Change that to partial hours must just be a case of replace the two occurrences of 1/24 with 24/01/60, then - as say you - Division COUNT (*) by 60.

    There may be performance issues using techniques of generation of line like this, if you put this in a query involving the joining of several lines of other tables (for example where the dates of beginning and end are derived from several employees?) or in several days. If you don't find it then count the number of whole days (taking weekends into account) between dates and work on the partial days after that it could be better. This would probably involve a lot of statements of case (which I don't have time to test it now).

    Ben

  • Calculating the distance between two images... ?

    Hello

    I'm trying to calculate the distance between two images (A and F - there are other images between A and F), but I can't seem to understand how to make good sense.

    Image A.x is "(stage/2)-(A.width/2)" and the image of F.x is "provable - imgSpace" which is a negative value (all images x is a negative value for image A.x). "

    In my view, the calculation is F.x - A.x, and although it could be good I still ned the value to be non-negative.

    Does anyone know how to do this?

    Thanks in advanse...

    I think you can find out the distance with this equation,

    var len:Numer = Math.abs (A.x - F.x);

  • Regular expression help please. (extraction of a subset of the string between two markers)

    I haven't used regular expressions before, and I can't find a regular expression to extract a subset of the string between two markers.

    The chain;

    Stuff of header I want
    Stuff of header I want
    Stuff of header I want

    Stuff of header I want
    Stuff of header I want
    Stuff of header I want

    6 ERRORS
                         
    Info I want to line 1
    Info I want line 2
    Info I want line 3
    Info I want to line 4
    Info I want to line 5
    Info I want line 6
    END_ERRORS

    From the string above (it is read from a text file), I try to extract the subset of string between ERRORS 6 and END_ERRORS. The number of errors (6 in this case) can be any number from 1 to 32, and the number of lines I want to extract will correspond with this number. I can provide this number of a caller VI if necessary.

    My current solution, which works, but is not very elegant;

    (1) using Match Regular Expression for the return of the string after you have synchronized the 6 ERRORS

    (2) uses the Regular Expression matches to return all characters before game END_ERRORS of the string returned by (1)

    Is there a way this can be accomplished using 1 Regular Expression Match? If so someone could suggest how, as well as an explanation of the work of the given regular expression.

    Thank you very much

    Alan

    I used a character class to catch any word or whitespace characters.  This put inside parentheses a substring matching the criteria that you can get by developing the node for regular expression matching.  The \d matches the numbers and the two * s repetition of the previous term.  So, \d* will find the '6', as well as "123456".

Maybe you are looking for