elapsed time after two output pulses

I have a gas with an output signal meter (or perhaps more accurately, a closing contact) for each cubic foot, put in the meter. The tricky part is that the closing time varies over time as the gas flow increases.

I am sucessfully measure the total volume of gas used in a 'run' by using a shift register to compare a change (closed or open) and divide the total by two changes. However, I would like to note the elapsed time for each foot cube through the meter and the putput that on-screen. This number should only be updated when each cubic foot passes through the meter. It's simple if it was just an impulse, or even two an amout set apart, but I have a problem with the irregularity.

No matter if the timer has elapsed begins on the forehead or the edge down so it starts and ends at the same place and the inverse of this number is then displayed on the screen.

My current control loop is a timed loop iterations to 250ms on a cRIO 9072.

Any advice on how to implement or the display would be great!

Hi, NXT,.

detect the rising edges of your meter. Store the current time in a shift on rising register and get the difference to the previous hour:

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.

  • To calculate the elapsed time between two attributes of timestamp

    Hello
    I have two timestamp (create_tmstmp & elapsed_tmstmp) attributes in a table.
    It has two rows and I need the difference in seconds between these two attributes.
    The following query returns the negative value and an incorrect value.
    Any help is appreciated.

    1st row:

    Create_tmstmp: 2010-02-02 9:53:15.832 PM
    Elapsed_tmstmp: 03/02/2010 9:49:47.527 AM

    Line 2:

    Create_tmstmp: 03/02/2010 5:35:47.614 AM
    Elapsed_tmstmp: 03/02/2010 11:03:15.937 AM

    Select
    ((extract(day from elapsed_tmstmp)-extract(day from create_tmstmp)) * 86400 +)
    (extract(hour from elapsed_tmstmp)-extract(hour from create_tmstmp)) * 3600 +.
    (extract(minute from elapsed_tmstmp)-extract(minute from create_tmstmp)) * 60 +.
    ((extract(second from elapsed_tmstmp)-extract(second from create_tmstmp)) * 1000) completed_tmstmp
    From table_a;


    The result is:
    completed tmstmp_
    74655
    -11997

    Thank you.

    Published by: solsam on February 4, 2010 11:57
    with t as (
               select to_timestamp('2/2/2010 9:53:15.832 PM','mm/dd/yyyy hh:mi:ss.ff pm') Create_tmstmp,
                      to_timestamp('2/3/2010 9:49:47.527 AM','mm/dd/yyyy hh:mi:ss.ff pm') End_tmstmp
                 from dual
              )
    select (cast(End_tmstmp as date) - cast(Create_tmstmp as date)) * 86400  + to_char(End_tmstmp,'.ff') - to_char(Create_tmstmp,'.ff') elapsed_seconds
      from t
    /
    
    ELAPSED_SECONDS
    ---------------
          42991.695
    

    SY.

  • Elapsed time

    Hi guys, I use the elapsed time to set an expectation and to have, at the same time, the ability to stop waiting.

    The problem is that if for example I put on hold for 1 minute the first time everything works fine, but when I repeat the same operation (my VI is a state machine so I can put it in an idle state) something goes wrong... I tried to debug but I am sure that the problem is the elapsed time for two reasons: the first is that I have replaced it with wait function (ms) and it works correctly whenever I want, the second is that I put a flag on the time elapsed (s) and the first time, I see that he County/wait of 0 to 1 sec while the second time in automatic mode it goes to 5,46 without any account Countdown.

    I hope you can help me because it makes me crazy.

    Hello

    I joined again the VI version 2012

    I've also attached the snapshot and the snippet where you can not open the VI

    Best regards

    TuiTui

  • time measurement between two finite pulse

    Hello Gerd

    Hello to you!

    I need support in the time between two pulses finished measure.

    Please find instant for the wave form, I want to measure the time between yellow and Red","yellow and blue ".

    Can you give me some indication to implement this thing?

    Concerning

    Nitin

    Oops Basics deliver,

    I'll implement the same and let you know if I find any difficulty.

    Thank you man.

  • Elapsed time in flat sequence Frames

    I enclose a VI file simplified what I'm trying to do. Ideally, this program starts when "OK" is pressed and cross frames (or steps) to the time indicated as wait times. The program would then reset. It will be meant to time the experimental stages, possibly with release of equipment parameters. I wish I could have a direct timer for each step backwards (ideally) or to give elapsed time. I tried different variations, but nothing seems to give me a direct timer as I'm looking.

    This timer is not entirely necessary, it would be good to know where experience is the place to experience 50 hours that makes us turn.

    I am very new to LabVIEW, please excuse that requires the simplicity of the solution that it likely.

    As a simple state machine, it is trivial. See if the attached VI may give you some ideas.

    Note that since this is a state machine...

    • It can be stopped at any time. If you allow only stop in the slow case, don't wire in other cases.
    • No local variable!
    • No loops inside loops!
    • No sequence!
    • A unique array of clusters setting information specific to the State in one place. Nothing distributed across multiple locations.
    • All States timer reuse the same code, just with two values different (State and duration).
    • For more complex scenarios, you can add more flavors State.
    • Note that I use the output of waiting for the tick ms. (you can also use the number of cycles, but who would need a separate waiting)
    • Simple, scalable, and extensible code. Just add items to the enum and add corresponding cases.
    • modify if needed.
  • Elapsed timer

    Hello

    I'm doing this project in motion sensor. I got to work like when it detects a movement it will turn on the Boolean value has led. I'm so now suppose to add some kind of timer which some recommended the passage of time, I tried to find but I do not know how to connect to my program. My task is to set a timer, while 10 minutes elapsed, no movement is detected, it will trigger a logic 1 (digital input) to another program. But now I'm focusing on this program I need to integrate the two to the right. So, how do I do not connect to make as how I had described. And finally I need a reset for that button after it input 1 logic (which will trigger an alarm - another program) it can be reset to zero and count down 10 minutes still. Thank you

    First of all, you keep in your original thread.

    Then take the LabVIEW tutorials.

    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

    Then, read the help file for the elapsed time function.

    Finally, set up a simple VI where you can experiment with how this function works.

  • How do I know the elapsed time


    Hello

    The difference between your option (a) and (b) is as below:

    (a) you get timestamp of the time before and after processes and subtract to find the elapsed time between the two... I will suggest you to convert time double data type before subtracting stamps...

    (b) you get "millisecond" of timer tick before and after the process count and subtract to find the elapsed time between the two... and last multiplication is 1000 to convert it to second...

    In my opinion, I'd rather (a)

    Thank you

    HS

  • 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 ;-)

  • Elapsed time [new]

    Can Hi anyone help me on this please...

    Comments and suggestions are welcome.

    Kind regards

    NORWEGIAN KRONER

    Altenbach says:

    I still don't understand why you need two timers. You can remove the timer B and simply compare the elapsed time of A with B time goal and light the LED if the elapsed time is higher.

    I meant like that.

  • different type of terminals of elapsed time of the DAQ assistant

    I connected a digital relay to one of the outputs. I have installation wizard DAQ to operate a valve with the relay. Now, I want to control the valve to drive all... .lets say 20 seconds, until I stop the program. What I need, is to change the State of each 20 seconds. I tried to use the "Out of time", but when I try to connect 'elapsed time' 'Data' on the ass of data acquisition. It reports on the different types of data. What would be the way easy and clean to use a "timer" to operate a relay on a basis of time fixed and periodic? Thanks in advance!

    I enclose a picture of my horrible test...

    I'm using Labview student 2009 edition.

    Put an is not in there also.

  • Get the elapsed time in the frame of the specific sequence

    Hello

    I'm running a flat sequence in one of my programs and read time elapsed in a picture in a form vi. I don't want to have the elapsed time for the entire program, just the elapsed time whenever this specific image runs, from scratch whenever that image in the sequence begins. The formula is just a linear equation which is dependent on time, so his criticism that it resets each time in order to provide a line that progresses from t = 0 each time. I tried to use in the context of the time, but I don't know how to set up properly to give the elapsed time, I'm looking for.

    I don't know how long the framework works because I just need a way to input what time her (ms or s) to a given point during execution, from t = 0 each execution.

    First of all, your formula.vi should be outside the framework of the sequence.  You can determine the run-time WHEN the framework is completed.  Place a County vi check before and after the image and subtract. (delta t is in milliseconds)

  • totalizer of time-elapsed time

    for those who can answer: is it possible that a "totalizer" elapsed time can be built? Im trying to implement a program that will measure the elapsed time a particular resistance will be on. Since the heating element will appear several times, the elapsed time must begin where he left off and continue to count until the next cycle, etc., if resistance is tested in a few months, the totalizer function will be very useful for FMEA (failure mode effects analysis) see the total time on the item was. IM using a structure of weather control box timer is active (true case) and a comparison function for the voltage at the output of a real or fake (0 = false, 120 Volt Volt = true). the timer\totalizer should operate only in the case of true.

    Here's an easy way to do it with registers at offset.

  • Reset the clock of 'VI' express of elapsed time, in a case structure.

    I use a box structure. For the event may be TRUE, the program must perform 3 Boolean operations TRUE condition I did use 3 screws to elapsed time. 3 Boolean conditions are executed in 2,5,8 seconds respectively. After 2 seconds, Boolean 1 should light up. After 5 seconds 1 Boolean should turn OFF and Boolean 2 should turn on. After 8 seconds 2 Boolean should turn OFF and 3 Boolean must turn it on and continue to stay THERE unless the FALSE condition is executed.

    During the FALSE condition, all 3 Boolean flags must disable (OFF) and all 3 timers must be reset to zero.

    When running from true to FALSE there is no problem, but when running from FALSE to TRUE, Boolean 3rd continues to stay in State, rather than the State OFF because the timer starts from the point where it was changed instead of reset.

    How can I fix this problem so timers start from 0 seconds to every time the REAL case is executed?

    hope this helps... If not, change your needs

  • Elapsed time delay does that once in the state machine

    Hello.  I have problems using the delay to show the seconds remaining on an expectation not in a simple state machine.  I have a front panel countdown indicating the time remaining for the step.  I thought that the delay of elapsed time was the way to do.  The problem is the vi work correctly the first time.  But then after that the calendar does not seem to reset at the time I had put.  If I remove the delay and just stick a waiting time in the State, the vi is exhausted because I expect.  This is just to give the user an idea of the time remaining.  What I missing when using the passage of time, or it's just the wrong tool for the job?

    A small question, is that I would like to move the tasks, in this case the LED outside of the loop, so I don't have to repeat the code.  But when I tried moving them outside with only allow constants within the State, they do not work as I expected.  If you have tasks such as operating a set of Boolean values that you are used in several States, what is the the cleaner way to do it without repeating the code?

    Thanks for the help.

    See how it works for you.

Maybe you are looking for

  • Apple G3

    Hello I took a notion on the purchase of an Apple iMac G3/400 'gumdrop' Indigo. It's funny, I've always wanted one when I was younger, but couldn't afford it, but now I have a Macbook Pro. My question is about the restoration. The G3 doesn't work ful

  • merger acquisition of data to read input data 2 or several at once

    Hi all I'm using or usb-6009 more then 2 incoming signals. the problem is that I can't read 2 signals at the same time. 1 my daq assistance will be apeared to be error. so, how can I set the .vi (attached) so that he could read 1 more signal since th

  • can I switch my URGE 4 sleekbook RAM

    my laptop model is HP ENVY 4 1212TU sleekbook [ http://support.hp.com/us-en/document/c03619719] which comes with 4 GB of RAM. can I upgrade the RAM to 8 GB?

  • HP C309a: Problem w C309a printer

    Hi, I hope someone can help me... I have not had problem with my printer years now since download for windows 10 months ago. I've uninstalled and reinstalled the software and the drivers several times but always seems to be a problem of system commun

  • Refilled ink cartridge does not print

    I put a new ink cartridge in the printer by default printer Hp laserjet 3020, but it prints as if the cartridge is dry.