Time delay between 2 waveforms

Hi,
Please bear with me while I explain what I’m trying to do :-)   Basically, in the attached LabView file (“flow vis + trigger-m.vi”), I am generating 2 signals: a sinusoidal waveform (used to drive an actuator) and a square waveform (used as a TTL signal to trigger image capture on a CCD camera). Currently when I run the program using LabView 7, both signals are started simultaneously. I would like to introduce a time delay that can be manually specified in the VI, such that when the program is started (i.e. at time t0), the sinusoidal waveform also starts (i.e. at time t0) before the square waveform (i.e. at time t0 + delay time). In a practical sense, this means allowing the actuator to run for several seconds before capturing any images.
It sounds like it should be quite straightforward to do, but I’m not so sure how to progress. I have begun to modify the original VI (“flow vis + trigger-m_2.vi”, as attached), but would be much appreciative of any help or suggestions on how I can complete the VI to meet the above requirement.
Many thanks,
Mark
Attachments:
flow vis + trigger-m.vi ‏939 KB
flow vis + trigger-m_2.vi ‏895 KB

Please refer this URL for an example VI I made to solve the problem:
http://forums.ni.com/ni/board/message?board.id=170&message.id=227603
Way S.
 NI-UK Applications Engineer

Similar Messages

  • How can I put a time delay between specific events in a while loop?

    How can I put a time delay between specific events within the same while loop? I'm already using the "wait" command to control the overall loop iteration speed. But I want to time the individual events as well.

    Hi Jesse,
    You can use a flat sequence. In each box you can put your individual events and attached wait.
    Don't forget to reduce your total loop time of the time you added in the individual sequences.
    Doc-Doc
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • Creating a Time Delay Between 2 Waveforms

    Hi,
    Please bear with me while I explain what I’m trying to do :-)   Basically, in the attached LabView file (“flow vis + trigger-m.vi”), I am generating 2 signals: a sinusoidal waveform (used to drive an actuator) and a square waveform (used as a TTL signal to trigger image capture on a CCD camera). Currently when I run the program using LabView 7, both signals are started simultaneously. I would like to introduce a time delay that can be manually specified in the VI, such that when the program is started (i.e. at time t0), the sinusoidal waveform also starts (i.e. at time t0) before the square waveform (i.e. at time t0 + delay time). In a practical sense, this means allowing the actuator to run for several seconds before capturing any images.
    It sounds like it should be quite straightforward to do, but I’m not so sure how to progress. I have begun to modify the original VI (“flow vis + trigger-m_2.vi”, as attached), but would be much appreciative of any help or suggestions on how I can complete the VI to meet the above requirement.
    Many thanks,
    Mark
    Attachments:
    flow vis + trigger-m.vi ‏939 KB
    flow vis + trigger-m_2.vi ‏895 KB

    Hi Mark,
    I forgot that all analog waveforms generated needed to have the same number of samples in a single task. By introducing a delay into your square wave, I effectively added samples that waveform. So the same number of samples added to the square wave has to be added to your sine wave. I added code that extends the number of samples of your sine wave (# delay + square wave samples). Let me know if this works for you.
    Regards
    Way S.
    NI UK Applications Engineer
    Attachments:
    flow vis + trigger-m70.vi ‏872 KB

  • How to measure time delayed measurement

    Hi All:
    I am using TDS3064 scope to measure time delay betwwen two channels (using IVI driver
    complience package 2.2 for scope IVI driver). I look through drivers, but not able to find
    delayed measurement function. Is there any alternate way to measure time delay betwwen two
    channels. If possible please provide me example. I am new to LV programming.
    Thanks
    DBhagat

    You have to understand something about IVI class drivers. To support portability, those functions that are common to a class are what you see in the driver. Some scopes might have the ability to measure time delay between trigger points on different waveforms but many don't. If there is such a function supported by your scope, then you can make a call to the instrument specific driver or a VISA Write/Read. Of course, you then loose the portability feature of IVI which, imho, is about the only reason to use IVI class drivers. What I would recomend is that you do a capture of both traces and then do an analysis of the raw data in LabVIEW. One way to do this is with Trigger Detection for 1 Channel (Analyze>Waveform Monitoring palette). Wire each channels data to the function and obtain the time for each trigger event. The function will return the time for each event that you can use to calculate the difference.

  • Crosscorrelation time delay question

    Hi!
    I have a project, where i work with 2 microphones, and i want to calculate the time delay between the two signals. I had made a simple method for it, but it's a bit bad...
    So now i  try it with crosscorrelation, but i can't get a correct time-format...i had made the correlation correct, i have just some problem with the time format...
    If i convert the time format into string with %<digit>, then i always becom 0...
    Here is my vi, can somebody help me?
    Attachments:
    CrossCorrforum.vi ‏134 KB

    I took a peek- your problem is with the format string on the timestamp to string functions.  Your format strings are "%5u" and "%S"  the %5u returns a string that represents 5 digits of fractional seconds, the %S converts only the whole number of seconds
    FROM the help-
    for format timestamp to string
    ..." Time
    format codes include the following:
    %a (abbreviated
    weekday name),
    %b (abbreviated month name),
    %c (locale-specific date/time),
    %d (day of month),
    %H (hour,
    24-hour clock),
    %I (hour, 12-hour clock),
    %m (month number),
    %M
    (minute),
    %p (a.m./p.m. flag),
    %S (second), %x
    (locale-specific date),
    %X (locale-specific time),
    %y (year within century),
    %Y (year including century),
    %<digit>u (fractional seconds with <digit> precision).
    So, How do you want to display the time information?  If you want 1 January 1900 12:00:00.000AM to display as "1/1/1900 12:00:00.0am" your format string should be "%d/%m/%Y\s%I:%M:%S%1u\s%p"  (ESCAPE CODES DISPLAYED)
    Jeff

  • Estimate time delay during execution

    Hi, everyone.
    Currently, I have a VISA program for reading signals from a GPS receiver. From the program, I want to measure time delay of execution, i.e. time delay between start and end as shown in the jpg. Are there any vi in LabView facilitating this purpose? Thanks a lot.
    Regards,
    yukfai88
    Solved!
    Go to Solution.
    Attachments:
    VISA.vi ‏12 KB
    Estimate delay.jpg ‏54 KB

    See attached VI and below screenshot which shows how to use it in your code. Just one solution...
    Attachments:
    Elapsed time LV80.vi ‏27 KB

  • Captivate created file playing with time delay

    I have an issue with some machines in the Company where Adobe Captivate files are not playing as created via Flash Player  ie where a slide should move onto another slide after a 3 seconds interval , this interval takes over 15 seconds. 
    I am not getting any error messages and the files play as required but with the serious time delay  between slides.
    The files created from Captivate are exe files.
    The strange thing is that this issue only occurs in some machines in the Company and I am unable to determine a pattern as to this issue.
    I have updated the Codec driver and the Graphic drivers on the affected machine but did not solve the issue.
    I have tested an affected file on 2 of the same model machines  (HP Desktop machines) both running Windows XP SP3 with Adobe Flash Player 10.3  and IE8.0 .
    The file played successfully on one of the machines but on the other machine there was a 10 second time lag between slides.
    I have checked Task Manager and the process is only using 2-3% of the CPU so the machine has enough CPU to run the file .
    I updated to Flash 11.1 on one of the machines and IE 9 but still encountered the same issue.
    I have disabled the Anti Virus software (McAfee) while testing on one of the affected machines and this did not solve the issue.
    All Machines have the latest approved Microsoft updates installed as required.
    The files are created using Adobe Captivate 3 and are stored locally on the affected machines
    The files created were created in captivate with a standard 30 fps option
    Can you please advise on this issue

    Welcome to our community
    As I understand things, when you launch an EXE file created by Captivate, it decompresses and temporarily installs a runtime version of the Flash Player. So I'm wondering if perhaps on these machines where the delay is occurring, if it would help to perform the following steps:
    1. Clear all temporary files
    2. Perform a defragmentation of the hard drive
    I'd try step one first and see if anything improves. Perhaps that's all that is needed. The second step is simply a good habit to get into.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • OSB 11g JMS minimum Delay Between Messages

    Hi ,
    We are consuming messages asynchronously from Weblogic JMS Queue using OSB BS. We want to add time delay between messages consume. It is kind of sequential messages, one after another, with time delay 1 sec. How to achieve this ?
    Thanks,
    Sri

    ps1(jms)->ps2(sb)->ps3(sb)->ps4(sb)From my understanding, the code for ps2, ps3 and ps4 should also get executed in the thread in which ps1 is executed. So if you put a constraint on the first then you are effectively putting a constraint on the entire flow.
    The number 16 for jms comes from weblogic mdb container's internal. I believe it is fixed and cant change . Doc says
    Default work manager or unconstrained work manager : Thread varies due to self-tuning, up to Min(max-beans-in-free-pool,16) If you are on non polling transports like http, then the max thread constraint available should be restricted only by the size of the self tuning execute thread pool. All requests coming for the proxy will be placed in the execute queue which will be further serviced by a thread in the execute thread pool.
    Refer to weblogic tuning docs on fine tuning default exceute queue and threads.

  • Random delay between WHILE loop during acquisition from DAQ

    I am working with the NI DAQ USB 6259.
    My purpose is to acquire data from an analog voltage input. My problem is showed in the attached image and consists in a RANDOM time delay between the execution of two consecutive while loop that contains the acquisition and the writing operations.
    If you observe the image attached, you can notice that samples are taken at regular interval (which I can specify) only within one loop, then between the instant of the last sample of one  cycle and the one of the first sample of the next cycle, a random delay occurrs.
    I attach also my block diagram which is very simple.
    I am forced to use the option "N samples" in the daq assistant because if I use continuous acquisition an error is returned, I guess because my acquisition can last minutes.
    It's like I were blind for a random duration between consecutive iterations of the while!
    Do you know an alternative solution to avoid this problem or its solution?
    Best regard,
    Roberto Rodio
    Attachments:
    while loop delay.jpg ‏52 KB
    block diagram.jpg ‏42 KB

    Have you tried to execute this without the writing to the TDM file?  I suspect that is where your delay is happening... So I propose you delete that from your block diagram... and execute your loop... if that works, you will need to move your file write to somewhere else in the process... possibly a parrallel loop... If not, consider stripping down the express VI you use for your data acquisition... The delay could be in that express... setting up, starting, acquiring and stopping the daq task... In which case, you can right click on it, say open diagram... or open vi or something similiar... LabVIEW will tell you that it must convert the VI, so OK (you can alway undo)... I am not sure what else you have going on... so you may already be doing that... but that is the first two places I would look.
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Invoke- Receive - Time delay

    Hello All,
    I have two Async processes, Process A and Process B. Process A invokes process B and waits for response from Process B. Process A gets the response back from process B when process B invokes process A, however there is a 10 sec time delay between the call and receive when I looked in the audit.
    Process A ->Process B (Process B is invoked immediately)
    Process B -> Process A (10 sec delay after process B calls process A).
    My version is 10.1.3.3. Can somebody suggests what do I need to do avoid this delay ...
    Also this is in development and I don't have many process running at the same time.
    Any help will be appreciated.
    Thanks & Regards,
    Ranjith

    p^2,
    I have written a quick example that turns on sequentially and off sequentially. This uses the DAQmx write function to turn on the relays, waiting 100ms [or other specified period] between each turn on. Then it waits another amount [in this case 200 ms] to ensure that the relay has been on for 1000ms [or some other specified period] before being turned off. 
    Frank,
    National Instruments
    Staff Software Project Engineer
    Attachments:
    Sequential Turn On Delays.vi ‏21 KB

  • ERS Batch job time delay.

    Hi Team,
    one of my user requirement is they need a 30 days time delay between service entry creation and evaluvated reciept settlement also they are running the process through Batch jobs.is there any standard variant where i can make the changes for the time delay or abap coding has to be done,kindly help me to proceed.
    Thanks

    SAve your selection variant after you have entered todays date in Posting Date of Goods Receipt.
    you get a new screen where you enter variant name and description. Below is a field list.
    find there the  field "Posting Date of Goods Receipt"
    scroll to the right, there is a column "selection variable", press F4 and select "dynamic calculation"
    then do a F4 in column "name of variable" and enter EQ in front of  "Current date +/- ??? days"
    hiit continue button then enter -30 and continue

  • MB51 and MCP8 time delay

    Can anyone advise why there could be a time delay between what MB51 is reporting and what MCP8 reports?
    For example, on 02/04/2007 MB51 shows 48 units of a product were received, however, MCP8 identified only 40 units. It took a couple of days before MCP8 was reporting the same quantity of 48 units displayed in MB51.
    Can anyone help on this?

    Hi,
    be careful with the dates involved.
    In MB51 the date is not necessarily the date of the movement, it is often the document date and this can be different from the actual movement.
    Have a look at the material documents concerned and check for all dates  Document date, posting date and movement date.
    Steve B

  • Contradiction between time delay and fetch bmp file

    Hi All,
    I need to fetch BMP file by confirm.vi(pic2), but when I run the program, the BMP file won't come out correctly. the last picture always come out. (for example, the first time picture A come out, but when picture B should come out, it still show Picture A.)
    the correct picture will come out correctly when i put time delay 100ms in the loop. but it will cost lost of time,two arraies have 300 elements and 20 elements separately. how can I make it faster to fetch the correct picture? thanks!
    Solved!
    Go to Solution.

    So you are using a file in order to pass data between loops?  That a major race condition.  Try using a User Event, Queue, or Notifier to send the picture to your other loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Signal time delay waveforms

    Hi,
    I`m using Labview 2009. I wann simulate various signal time delays. Pls find the attachment.
    I tried with waveform generator and component tool eg: dt, t0 but `d not simulate my requirement.
    Also I tried searching in forum for similar VI but `d not get 4 my requirements.
    Pls help.
    Regards,
    Manoj
    Attachments:
    Waveforms.JPG ‏171 KB

    I`m simulating PTT kinda situation so I have used Digital Random Generator in my VI.
    Whenever PTT is pressed (active low), data enable shud be become high after a few delay say T1.
    Whenever PTT is pressed (active low), audio signal (sine waveform) shud pass through after a few delay say T2 & so on.
    Similarly for rest of the waveforms.
    But here `m not able to get a constant delay for all the transitions of 0s & 1s using my VIs inspite of using waveform components like t0, dt.
    I was stuck here. So only I didnt proceed with sine waveforms(audio signal).
    pls tel me how to go abt dis
    Regards,
    Manoj

  • My recirculating pump in sub vi simulation link doesnt work in the second iteration .It opens for maybe half a second whereas i gave the time delay for 5 secs..plz help very urgent

    Hi,
         I have attached my simulation loop.In the model attached i hav eone main pump with constant rpm which drives the 5 smaller pumps and fills the tank at the same time.As soon as the tanks reach their 90% level,the valves of the five pumps close(SP1,SP2,SP3,Sp4,Sp5).After that the recirculating pumps opens for 5 secs of the first tank.As soon as the recirculation finishes,the drain valve(SV1) for tank 1 open and the volume goes to interim storage.This happens for all the remaining tanks.
    My simulation works the first time,but when the second time the loop starts,it skips the recirculation pump even though i gave a time delay for 5 secs.Plz help ..I have attached the simulation.
    Thanks,
    Rami
    Attachments:
    Spatial Logic_2_Final.vi ‏223 KB

    Rami,
    I suspect that you have a race condition. The widespread use of local variables frequently leads to race conditions. Your subVI (Spatial Logic Sub_2.vi was not included) so I cannot run the VI. You have no way of knowing whether the subVI or the inner case structure will execute first, because there is no data dependency between them.
    I think a shift register or a few and some dataflow thinking would allow you to eliminate the inner case structure, the local variables, and, probably, most of your problems.
    Some of the SPi are indicators and some are controls. How are they used?
    The last case of the inner loop retursn to Case 1. Would case 0 be better?
    As for the second time through issue, it may be related to the Elapsed time function Auto Reset. From the help file: "Resets the start time to the value in Present (s) when the Express VI reaches the Time Target (s)." If more than 5 seconds elapses between the first time you use this and the next, it will exit immediately on the subsequent calls.
    Lynn

Maybe you are looking for