Can I run a fast timed loop?

It appears that a timed loop cannot run faster than 100 hz. In other words, the "period" input for a timed loop cannot be less than 10. Is this true? I am using the Elapsed Time VI to measure time increments. The time increments output from this VI are at least 0.01 secs regardless of how fast I attempt to run the time loop. Perhaps the limitation lies in the Elapsed Time VI, not in the Timed Loop. Should I try a different approach to measuring the delta time between iterations of a time loop? TIA.
-jlivermore

Here's the simple way to measure loop timing:
Actually, what else is running in your loop (e.g. property nodes, DAQ, etc.)? Can you show us your code? What is your LabVIEW version?
Message Edited by altenbach on 09-29-2008 11:22 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
MeasureLoopTiming.PNG ‏7 KB

Similar Messages

  • Run once inside timed loop

    I have a timed loop that monitors equipment. Whenever there is a fault I have it send a notification email. My problem is how to stop it from sending email every single time the time loop is executed. I tried placing the send email inside a for loop but quickly realized that the entire loop itself is reiterted. Any help is much appreiciated.
    Solved!
    Go to Solution.

    Hi icemaker
    I'm not really sure what you mean. Wouldn't a case structure be a solution?
    Could you post some code so we can see what you are doing?
    Best Regards
    David
    NISW
    Message Edited by Davidek on 10-02-2009 09:58 AM
    Message Edited by Davidek on 10-02-2009 10:00 AM

  • Unable to run Timed Loops

    Bit of an odd one that had me scratching my head.
    I have a development system consisting of a PC running a 7842R, acquiring analogue and digital data from the FPGA, loading it into a shared variable, and reading it out within a timed loop on the host as one parallel loop in a producer-consumer architecture.
    All's well until one day last week when I noticed my host VI becoming unresponsive.
    After a bit of digging, I find that the timed loop doesn't run at all. Replacing with a while loop with a wait at least allows me to show that the error is timed loop related, but it's not a viable long term option for me. Creating a new project and a new VI with a simple timed loop showed the same behaviour.
    A restart of the system, and rerunning the same VIs, and no problems since.
    So, questions:
    1) Has anyone else seen this behaviour?
    2) Any idea what causes it? A service crashing, for example?
    3) Is there a way of recovering without a reboot? If it's a service crash, I'm hopeful.
    The system will eventually form part of a production test environment, hence the query.
    Edit - also, wiring error terminals of a timed loop is a good way of highlighting errors of course.
    FWIW, LV2012 SP1 32bit, Win7 64bit, Core2 Duo, 4GB RAM, tassels from the handlebars etc.
    CLD

    The timed loop is used to read all elements from a DMA FIFO and load them into a buffer FGV, which spits out packets of N samples long once they've assembled within the FGV. Ordinarily, I'd do this with a timed while loop and be perfectly happy to do so. However, the elements are actually an interleaved array, meaning that I have to demux them in the correct order that they were loaded.
    I use timed loops for a number of reasons: on my current Windows host, I've found that using a while loop has caused me more problems with respect to disordered packets, and that at least with using multiple timed loops (two, at most), I can assign priority to the acquire loop. Finally, it's also a development platform, and will be deployed onto an sbRIO once the electronics integration is finished in a week or two!
    W.r.t. system resources, there's very little else running on that system, but that doesn't normally stop Windows
    I recognise it's not ideal to run a software timed loop under Windows, but when you cannot run a blank project with Optimizing timed loop rate.vi from the shipped examples with nothing else running, it makes me curious to know why!
    CLD

  • Can we run two while loops independently in one application?

    I am acquiring two channels using PCI-6052.both channels to be read at 2ks/s,but I want to scans read at a time different for each channel,So I put two AI-read vi's in two different while loops.but the second while loop waits until the first is completed.Can we run independently both while loops?

    Dear Haider Abbas,
    you can scan two different channels at the same time with the same AI Read if your hardware device is cabable of it, e.g. you must have one A/D converter for each channel. If you have one A/D converter only and your channels are multiplexed then it won't work.
    You can try running both loops indepentendly by using delays but in this case the data acquisition will not be at the same time. You have also to consider that every time you call for AI Read the DAQ card will be initialised with takes some time
    Hope this will help you.
    Stephan

  • I am using a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). How can I get a faster response?

    I am trying to create a virtual engine within a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). This does not however allow realistic engine speeds. How can I overcome this? I have access to a PCI-MIO-16E-4 board.

    andyt writes:
    > I am using a timed while loop and am unable to get the loop to run at
    > a speed of less than 1ms (I am currently using the Wait(ms) function).
    > How can I get a faster response?
    >
    > I am trying to create a virtual engine within a timed while loop and
    > am unable to get the loop to run at a speed of less than 1ms (I am
    > currently using the Wait(ms) function). This does not however allow
    > realistic engine speeds. How can I overcome this? I have access to
    > a PCI-MIO-16E-4 board.
    Andy,
    Unless you use a real time platform, getting extactly 1 ms loop rate
    (or even less) is impossible. It starts getting troublesome at about
    0.1 Hz for standard operating systems.
    I'd tackle your problem with "if i mod 10 == 0 then sleep 1 ms".
    Of
    course this is jerky by design.
    HTH,
    Johannes Nie?

  • Timed loop in a subvi, one or the other runs but not both.

    I have a vi with two sub vis. Each sub vi contains a timed loop that updates a global variable. In the top level vi I read from each global and display its content. When I run the top level vi I see only one global counting but not both. If I start and stop the top level vi the sub vis take turns counting but they never both count. If I replace the timed loop with a while loop in each subvi then both count. If I move the two timed loops from their respective sub vis and place them in the top level vi then both globals show counting. Can any body explain what is going on.
    I'm using Labview 2010 SP1.
    Attachments:
    Test Of Timed Loop.zip ‏72 KB

    Never Mind!
    When I cloned the subvi I forgot to change the structure name of the timed loop. Placing an error indicator inside the subvi disclosed the error -808 (Error -808 occurred at an unidentified location. Possible reason(s):LabVIEW:  The given name is already being used by the following timed structure.).

  • Is there anyway I can run a faster OS on my G4 Powerbook (pre Intel)?

    I was very kindly given a G4 Powerbook by my uncle, but after waiting a whole year to get it I was heartbroken to realise I could not sync my iPhone 5 as it needs to run a faster OS to be able to run iTunes 11. My mum established it is a pre Intel processor which is going to make things virtually impossible and she and my other uncle have trawled for advice and instruction on the possibilty of upgrading the processor which is coming up as a big fat NO! (an occassional person seems to think you can change the whole board but most seem to think this won't work!) A new machine is not going to happen even 2nd hand we don't have the money and I was over the moon when my uncle gave me his (very) old one the only reason I have a 5 is because I saved so hard and it put together with various family members for Christmas and Birthday. If I can't upgrade the processor at all is there any other way at all I can run it on any faster OS to be able to run an updated enough iTunes to be able to sync it to my phone?
    Thank you so much for your time to reply
    Here's hoping! xxx   

    The path to upgrade to a later OS X requires a different build series intel-based architecture and a few companies offer used repaired guaranteed models, older yet still serviceable Apple portables, some also have desktops. Parcel costs vary.
    And to reach the newer App Store, iTunes Store, Mac App Store, etc you'd need to get Snow Leopard OS X 10.6(.8) on DVD, or a computer model such as MacBook 13-inch Late 2009 that shipped with 10.6, and included a system install-restore disc. The original packaged applications would likely not be available, in a used or refurbished third-party computer, usually the as-shipped OS X system in basic form.
    A MacBook from 2006 can run Snow Leopard 10.6(.8) but any included software would be older than that; so the retail DVD for 10.6 from Apple costs about $20. before shipping. Older MB models have a ceiling on what OS X versions they can use, based on hardware limitation and age.
    Depending on where you are located, you could probably get a fair deal on a repaired used MacBook for around $350 or so, plus shipping. And extra fees, taxes, duty, when shipped to another country. wegenermedia has some intel-based macbooks and options for a fair price; they repair too.
    otherworldcomputing
    http://eshop.macsales.com/shop/Apple_Systems/Used/Macs_and_Tablets
    wegenermedia
    http://shop.wegenermedia.com/index.php?main_page=index&cPath=9
    An intel-based Mini with at least 2 or 4GB RAM and OS X 10.6.8 could likely be OK, depending on cost and whatever was included with it. And be sure it is not a powerPC old model. Some persons still want those older PowerPC G4 macs, ibooks, powermac, powerbooks, etc. But they won't connect with iPhone, etc.
    Hopefully you can get the iPhone 5 to directly get apps and updates without a computer. Not sure if an Apple Store would be able to help you figure out how to go online and upgrade or update, get Apps, etc without a computer. If you have a real Store you could ask. They may have a genius, maybe even some free help?
    Good luck & happy computing!

  • Once my iphone4s updats to ios 6.1.2,the electric quantity runs so fast!And the mainboard is so hot, when I use it,especially,make calls. If I make calls exceed two minutes, it gets so hot, that I can't be able to hold.

    Once my iphone4s updats to ios 6.1.2,the electric quantity runs so fast!And the mainboard is so hot, when I use it,especially,make calls. If I make calls exceed two minutes, it gets so hot, that I can't be able to hold. If the battery is full at night, it falls down almost a half, when I get up. I don't know what is wrong with my phone, need help.

    Thanks for the input.

  • Battery running down fast using Yosemite, running the latest update 10.10.2. I think there is bug in this update. Please help me out or is there a way can i switch back to mavericks and how

    Battery running down fast using Yosemite, running the latest update 10.10.2. I think there is bug in this update. Please help me out or is there a way can i switch back to mavericks and how

    1. Check the cycle count of the battery against the rated life for your model. The battery may be due for replacement. If the power adapter is connected almost all the time, the battery may need replacing even though the cycle count is not too high.
    2. Follow these instructions, or these for OS X 10.8 or earlier.
    3. In the Energy Saver preference pane, uncheck the box marked
              Enable Power Nap while on battery power
    if it's shown (it may not be.)
    4. You can also try resetting the SMC.
    5. Make sure your system is up to date in Software Update.
    6. Make a "Genius" appointment at an Apple Store, or go to another authorized service center.

  • If i export my project, it runs much faster than in the canvas. How can I fix that?

    If i export my project, it runs much faster than in the canvas. How can I fix that?
    I'm from germany, sorry for my english!

    When you export your project, it is "compiled" into video format. Any player will play it at its frame rate.
    Motion is a compositing application. It has to make many more times the calculations needed to animate everything and 90% of the time, it's just not possible for Motion to keep up with "real time".  It's to be expected. Learning to live with that fact will make life a lot easier for you, I promise.
    There are a few things you can do to help speed up Motion:
    Reduce temporary play ranges to no more than about 5 seconds at a time. You can move the Play Range In and Out markers from section to section. Motion does all of its real time rendering in RAM. The longer the play range, to more it has to work managing that memory.
    Remove Preview Icons from the Layers list ( View menu > Layers Columns > Preview will toggle the views)
    When you play your animation, turn off on screen guides: (command - / will toggle onscreen guides)
    In Motion 5, reducing the quality of playback from the Render menu does not make a lot of difference anymore, so you might as well keep the default settings of Dynamic, Full and Normal on. However, Motion Blur, Frame Blending, Field Rendering, as well as the lighting options will affect playback, sometimes by quite a lot. So if you have Lights, turning off Lighting, Shadows, and Reflections will get back a lot of real time playback speed (just remember to turn on all that you need before rendering, or these things will be left out of the export!)
    HTH

  • How can I count the number of times a timed loop finished late?

    I am getting occasional timing errors in a timed loop under windows XP and would like to count the number of errors, but I can't find a simple software counter vi

    The timed loop has a terminal (boolean) to indicate if the previous iteration finished late. Just increment an integer shift register if this happens.
    The attached shows a very simple demo (LabVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LateCounter.vi ‏76 KB

  • Timed loop running parallel with Queues

    I was wondering if it is possible to have a Producer/Consumer Pattern with a timed loop that is not just executed when it is called by the queue or from the Producer Loop, but also executes the timeout after a given time.
    Thanks in advance, Oliver
    Attachments:
    example.png ‏42 KB

    lol
    thank you Norbert great advice
    I was so focused on wanting to use a Timed Loop that I totally forgot about the dequeue TimeOut
    cheers Olli

  • Battery running out fast om 5.0.1, also no zoom in camera, how can I fix that? Anybody?

    Since updating my phone to 5.0.1, it seems like the battery runs out FAST!  Just sitting....Also the zoom doesn't work on the camera. I tried "pinching the screen" but I think with the case on it, that doesn't work, tapping twice doesn't work either.  Don't like these changes!  Very annoying.  Phone was fine until they recommended updating....Folks, don't do it if you haven't ......not until they get the bugs out.  Any way to go back to the last operating system, without going crazy?   anybody?

    Have you tried basic troubleshooting techniques?v I have IOS 5.1 with no problems

  • Timing loop speed

    Hello,
    Is there a limit to how fast a timed loop can run with an accurate timestamp? I would like to sample at *exactly* every 200 msec, however my output file indicates that it is ~ 200 +/- 10. Is there a better way to create my timestamp? BTW - the Init.vi notes the time in seconds since 1/1/2000 and all subsequent time is relative to the start time. THis is a desired output format that I cannot change. Thanks.
    Attachments:
    InitFile.vi ‏20 KB
    CNAP Daq.vi ‏101 KB

    Why are you using a timed loop?
    In order to sample at precisely 200msec intervals, I suggest you use hardware timing and NOT software timing.  The onboard clocks on the DAQ boards are much, much more accurate than anything you can do in software, timing-wise.
    What I would do is get rid of the timed loop, use hardware timing for the DAQ task, and collect the data as a waveform.  The waveform datatype contains timing information.  Look at some of the examples that ship with LabVIEW.  "Find Examples"..."Hardware input and output"..."DAQmx"..."Analog Measurements".
    Your timestamp is only accurate to ~16msec because it obtains the time from the Windows clock, and that's how accurate the Windows clock is.  That's the best it's ever going to do, so if you need better than that, use hardware timing for your DAQ.
    Hope that helps a bit...
    d

  • Help for RT PC timed loop in us?

    I have created realtime target  quadcore PC  and created a pulse pattern(500kHz) using DIO pin0.1 and both counters. I want to repeat the pattern or send manny patterns after 512us. I am using time loop. It is not providing more than 28ms however it is showinh 1Mhz clock which is not present in not real time loops.Please help me out to have the time loop run at 512us interval?
    Yours sincerely 

    Hello Ali,
    I understand your frustation, and please accept my apologies for any inconvenience. I checked the domentation and according to this document:
    http://digital.ni.com/public.nsf/allkb/0C0A6EE528F​85A6486256F6700061790?OpenDocument
    The Desktop PC´s should be able to use the MHz clock source. However remember that if you are acquiring data, the sampling rate does not depend on how fast the timed loop iterates, as the DAQ board has it own clock. The timed loop just determine when you call the DAQmx read function to pull out the data that the DAQ board has out in the memory buffer. My advice at point however is that you create an Service Ticket so we can assist better, or if you want to share your code with me I can test it in one of our PXI devices to see if the issue is with your code or your hardware, in any case we would like to help you, as our final goal is that our customer are succesful while developing their projects
    Regards
    Mart G

Maybe you are looking for