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

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

  • 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

  • Impulse trigger to create a time delay of x ms to perform an action for y ms

    Hello all,
    Here is what i'm trying to do:
    I'm measuring an audio signal when a sound level is above a certain value Y (controllable) i need to wait a few ms (around 900ms) to get pass the main sound compound. Yhen i need to filter the next few ms (around 500ms) of data and do a FFT of that part of the filtered data only once until Y is reached again.
    I can do all this with saved data but i'm struggling to do it as it occurs without saving the data.
    I have everything in place i just need to know in general how to use an impulse trigger to a create time delay of x ms to perform an action for y ms.
    Do you have any ideas how i can achieve this?
    Thank you in advance,
    Frederic.

    Hi Frederic,
    I've looked at your program and I have a few questions. What is the purpose of the Two While Loops that simply have a Case Structure that nothing in the false case and a Wait (ms) function in the true case? As it stands if these loops go into the false case then there is nothing to slow down the execution so the will try to run as fast as possible and not give the processor any time for other tasks which may explain why your computer goes so slow whilst this is running. This also applies to the While Loop where the false case says "If its not time to write the measurement file, do nothing."
    I believe that what you want to look at is a Producer/Consumer(data) Pattern, where you have one loop that generates your data (producer), in this case reads in the sound data, and then a processing loop (consumer) that will do the Fat's and log data to a file etc.
    More information about this can be found here: http://zone.ni.com/devzone/cda/tut/p/id/3023
    Hopefully this helps you a bit. Let me know any questions you have.
    James W
    Controls Systems Engineer
    STFC

  • How do I create a time delay so the signal from my throttle is not too fast for an ESC?

    I am using Labview to control a ROV using a Playstation 3 controller.  When I throttle too quickly the ESC cuts off and resets.  I talked to the manufacturer of the ESC and they said the probable cause was the signal was changing to fast for the ESC to follow andthey recommended putting a delay in the program to allow time for the ESC to read the throttle increments.  My question would be "How do I do this?"  Thanks

    I'm not exactly sure how to do what you are talking about.  I have been doing this for about a month and have taken only an intro class in Labview at my university.  Could you point me in the right direction to learn how to do it .  I have attached the VI just in case you wanted a closer look at it.  Thanks
    Ivan
    Attachments:
    PS3Thruster.vi ‏210 KB

  • Can you create a time delay with AS3?

    Is there some simple ActionScript 3 code which would cause a delay in the timeline when it's encountered?
    Say, for example, we hit Frame 50. Is there code I can place there that would make the timeline "stop" for a specified amount of time?

    Thanks, if you say it's simpler I'll look that up as well.
    Sometimes there just isn't enough time to learn something as complex as ActionScript. I'm currently juggling Flash, Dreamweaver, CSS, video editing, After Effects, Soundbooth, Cinema 4D, broadcast video etc. etc. I wish Flash would automate at least some of this stuff like they did before with Behaviors.

  • 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

  • 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

  • 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

Maybe you are looking for

  • HT204088 Payment Deducted after changing my Account Bill Info

    Sir, 60Rs have been deducted from my account for 3 time last 4 days......I really dont know why??....Now when i have changed my Account Information, Again 60 Rs has been deducted.....Please i Need the explanation for that!!!!!!!!!!!!!!

  • Edit PDF's

    I'm considering purchasing a iPad (I currently have a iPhone4s and love it)  A huge part of work deals with editing pdfs, from what I can tell this will not work on the iPad.  Does anyone know if this is correct?

  • HT4918 Can the address book off my computer be accessed by iCloud?  It wasn't part of Mobile.Me.

    We are going on vacation and I'm hoping to be able to access the address book off my home computer (iMac desktop) at our hotel (PC).  I just tried it on my husband's PC laptop and it didn't work.  Do I need to do something to the address book to make

  • How do I make the view of my screen smaller?

    There must have been an automatic update to Firefox in the last few days because suddenly, the images on my screen went from normal to gigantic. The size increase is about 150%. Any ideas on how to make it go back to 100%?

  • Pearl email setup.

    Hi all, I'm about to tear what little hair I have left from my head, lol. Whenever i try to set up my email on the wizard I get two options. 1. I want to use a work email account with a blackberry enterprise server and 2. I want to skip email setup.