Timing Loop won't Execute

I think this is a labVIEW bug, but I'm looking for a work around or a 'gotcha'.
I was attempting to create a timing loop for the purposes of sychronizing two sections of code within a VI.  The timing loops would not execute and so as part of the debugging process I created a simple empty timing loop with a 'stop button' in it.  Put a probe on the wire between the stop button and the stop terminal of the timing loop and executed my VI.  The Timing loop never executed.
I then created a new VI to continue debugging the timing loop: I created a new VI and a new timing loop with only a stop button, placed the probe in the same place, (between the button and the stop terminal) and ran the 'untitled vi'.  In the new vi the timing loop ran as intended.
All I can think is that there is some VI property in my rather complicated VI that prohibits timing loops but is not producing an error or warning.  I did check the VI properties and though they are not default there isn't anything that should be interfering with running a timing loop (e.g. critical execution).
I'm looking for solutions and work arounds.  
Using LabVIEW 2014 SP1 32 bit.
-Regards
eximo
UofL Bioengineering M.S.
Neuronetrix
"I had rather be right than be president" -Henry Clay
Attachments:
timing loop.PNG ‏9 KB

The attached image of the first post is the disfunctional version, Attached to this is a segment of the VI with the example disfuctional timing loop at the bottom right.  
-Regards
eximo
UofL Bioengineering M.S.
Neuronetrix
"I had rather be right than be president" -Henry Clay
Attachments:
Timing loop not working.PNG ‏68 KB

Similar Messages

  • Sim. arb. signal within Timed Loop?

    Hi there,
    Is there any inherent reason I couldn't/shouldn't put a Sim Arb Signal VI within a timed loop? I have a scenario in which i need to modulate an arbitrary signal as the experiment is being run. I've placed the express vi inside a timed loop set to execute every millisecond. The express VI is setup to generate a single point of a arb signal with a dt=1. It seems however that it generates the whole signal each time the loop is called. Is there an appropriate example or tutorial somewhere out there in cyberspace?
    Apologize for not posting an example, but I am working from home tonight.
    Regards,
    Matthew Pausley
    NC State University
    Raleigh,NC

    Matthew,
    I have tried making the simulate arbitrary signal vi output a singal point using your suggestions and it worked.  Perhaps you need to compare the VI you are using with this one. 
    I hope this helps.
    Steven T.
    Message Edited by Steven T on 10-16-2006 11:46 AM
    Attachments:
    example2.vi ‏110 KB

  • Beginner Question: Won't execute index to nested while loop

    Problem:
    I have a nested while loop inside a for loop. The for loop runs over and over from 0 to 587. I want the while loop to only execute when the for loop hits 587 by means of a continue condition which is on when 587 = [ i ], the for loop iteration number. However when I try to change the value sent to the while loop from 588 none of the probes execute. This is bad because the index only runs from 0 to 587 and never equals 588.
    Context:
    This is for real time video analysis. Trying to convert a 658 x 492 color video feed frame by frame into low resolution grayscale video. With this index error the output is currently the top left 1/4 of the image, repeated in a 2x2 grid on the image display.
    The VI is attached. I'm very appreciative of your thoughts on this.
    Attachments:
    Bin.vi ‏237 KB

    The for loop is responsible for processing a frame. At the completion of the execution of [ i ] from 0 to 587, the replace array VI outputs the final product of the frame. So every time [ i ] = 587, the replace array VI needs to send its array to the arraytoimage, which in turn must send the image to the image display.
    I got rid of the while loop and replaced it with the case structure. 
    Maybe the problem is with the false case of the case structure? I want to continue outputting the same image for the next [0, 586] each time after it sends an updated image on the [ i ] = 587 iteration.
    Attachments:
    Bin.vi ‏238 KB

  • Minimise front panel of vi containing timed loop = problem

    Is this expected behaviour...
    Run the attached VI.
    All it is supposed to do is beep every 10 cycles.
    When you minimise it and try to restore the front panel though... it locks up for a random amount of time.
    I don't think it is supposed to do that. (I'm running it on XP Pro.)
    Originally I was chasing this problem in a data acquisition loop. The buffer would overflow and exit the app with an error when it was minimised.
    It took all day to track it down to this.
    Hmmm... I just tried to save it back to a version 8.0 vi and it doesn't seem to have the same error!
    Message Edited by Troy K on 10-03-2008 05:26 PM
    Message Edited by Troy K on 10-03-2008 05:31 PM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    Timed Loop minimised.vi ‏85 KB
    minimisetimedloop.png ‏7 KB

    I'm using LabVIEW 8.5.1 on two PCs and it does it on both of them.
    I just emailed the vi to a colleague and after a few minimise/maximises it locked up on him too.
    I've just found that if I remove the left and right data nodes inside the timed loop the bug seems to go away.
    Steps to repeat bug:
    1. Minimise all windows (Windows+m)
    2. Restore vi front panel and run it. (It should start beeping twice a second)
    3. Minimise / Restore it rapidly by repeatedly clicking on the vi's Front Panel 'task bar button' (down the bottom).
    After a while the beeping will stop when the front panel is minimised and it wont restore. Then after a while (with or without clicking on the task bar button) the front panel will restore and the missed periods will execute very quickly (as the timed loop does what it is configured to do).
    I think because of the simplicity of the example vi the bug doesn't show up as often. When I ran it in the real application (too many vi's to post) it crashed every time. In the real application there isn't much going on in the timed loop, it is just used to queue items into a separate consumer loop. The problem is that when the bug occurs, ALL LABVIEW CODE stops executing, not just the code inside the timed loop. So another vi running in parallel (in a daemon) that retrieves messages from a device queue stops and the device buffer overflows.
    Attached is a modified vi to demonstrate that code outside the timed loop stops executing too. The bug occurs here on three different PCs, the only common thing I can think of is LabVIEW 8.5.1.
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    Timed Loop minimised 2.vi ‏89 KB

  • Open VI Reference Function won't execute in multi process application

    I have a sub vi with Reentrant execution, and it has
    recursive call on some cases.
    It is very similar to OpenG VI “Read Key
    (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two
    Button Dialog is opened in other process loop.
    I have attached a Test VI, and would like to understand why
    would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
    Why Open VI Reference Function won’t execute when Two Button
    Dialog is opened in other process?
    LabVIEW version 8.6
    Thanks,
    Attachments:
    Test Vi.zip ‏17 KB

    Broken Arrow wrote:
    LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
    Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
      I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
      I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
    Attachments:
    Test Vi 2.zip ‏20 KB

  • Timed Loop in Producer/Consumer Loop

    Hello!
    I have a producer/consumer loop LabVIEW program setup to allow me to properly capture images that are quite large (8MP) at approximately 14 frames per second (FPS). The program works great when the consumer loop is a 'while loop' (records at 14fps no problem), but I wanted to make it into a timed loop, so that I may vary the FPS as required. An oddity arises when I do this. Anywhere below 12fps, the loop works fine and the data is recorded properly. However, when I bump it up to 13fps, the consumer calculated FPS goes haywire and starts jumping between ~9 and ~13fps (data processing gets bogged?). When I set the required FPS to 14, the loop executes at a steady 7FPS maximum. Is there something I can do to rectify this situation?
    I have attached my .VI
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    ProcessSplitJPG-FPS.vi ‏100 KB

    Palanski,
    Are you using LabVIEW Real-Time? Timed loops in a windows OS don't really increase determinism more than a while loop with a wait until next multiple timer. Before you changed the producer consumer loop to include a while loop was the programming running correctly? You may also want to vuse the VI analyizer to see how long things are taking to run. I would leave the producer consumer loop in the traditional set up and change the FPS by controlling the wait timer, after benchmarking your code this should be done the same way as you have it for the timed loop
    Sam S
    Applications Engineer
    National Instruments

  • Missed iterations of TTL triggered timed loop

    Hello everyone,
    I have a camera control VI that waits for TTL information from the camera shutter and uses it as a timing source for a timed loop. In this timed loop the camera is readout and analyzed. The program should react as soon a possible to a new image and therefore I set the timed loop to 'Discard missed items'  so that it doesnt try to catch up (the events im trying to detect are quite rare and last several frames). 
    The problem is this: When I set the camera for a certain numebr of frames (for example 10.000 frames) sometimes due to the discarded frames the loop iteration number never reaches the expected last frame number and doesnt exit (it stays at 9.998 for instance). I noticed I can prevent this by deselecting 'maintain original phase' . However it is unclear to me what exactly happens with these settings in a TTL triggered situation like this. 
    Is it the case that the loop skips the new data but starts the next loop at the correct iteration number (+1)? Or is something else happening?
    Im thankfull for any help!
    Solved!
    Go to Solution.

    Dear j.win,
    If you deselect "Maintain Original Phase", actually you will never discard any iteration, whatever the value of "Discard missed items". Instead, the loop will try to catch up with the late iterations.
    Using an external timing source (your TTL for example) instead of an internal timing source does not change anything. You can use the "Period" (dt) input of the Timed Loop to specify when the loop is supposed to iterate (the unit is the "ticks" in the case of an external timing source). A value of "1" means that the Loop try to iterate at every ticks of the external timing source. If for some reason one iteration lasts longer than that, you will have a "late iteration". Also with a value of "1", it is not possible to modify the "phase", then the "Maintain Original Phase" parameter will just defined wether or not you skip the iteration. If "Maintain Original Phase" is false, the loop will execute immediatly after a late iteration to still execute it, but a bit latter. If the "Maintain Original Phase" is true, the loop will execute immediatly after a late iteraion if the "Discard missed item" is false otherwise the loop will skip the iteration.
    Is it clearer now?
    Regards,
    Cédric | NI Belgium

  • 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

  • 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

  • Is there a way to immediately abort a timed loop

    Im writing a program that when completed, could run for a very very long time. But I need a timed loop to execute every 60 secs. The two option I have come up with are these
    1. Timed Loop executing every minute
    2. Timed Loop executing every second, but processing the contents every minute.
    First way means I can't stop the loop until the time expires (more desirable than the 2nd option), the second option relies on the ability to determine when a minute is up based upon a 1Hz iteration rate, but from what I am reading, the iteration counter will eventually get to its max value and just hold its value, while the loop continues to execute (hence I lose my logic for content execution)
    I'm really hoping there is a way to do an immediate abort of a Timed Loop, but i'm not finding a way, lol
    Solved!
    Go to Solution.

    If you want to use a timed loop, you can stop it at any time using the Stop Timed Structure tool. (even if the conditional terminal is hardwired to never stop!)
    For example in the following code draft, pressing the stop button will stop and complete the timed loop immediately, no matter how long the interval is.
    (Note: Configure the timed loop to get the current name, or set your own)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StopTimedStructure.png ‏12 KB

  • What is wrong with this (timed loop error)?

    I can't figure out why the timed loop is not starting and I receive an error -805 message. Any idea?
    Thanks,
    Ben64

    Hi Ben64,
    There's no obvious problem.
    I tried the same and it works perfect.
    So there must be a problem under the cover.
    I have 2 suggestions.
    1) There is a problem with your wiring -> the Error wire is not connected to the loops error out -> close timing source is executed before the loop is executed (Are you sure the loop doesn't even start ?)
    2) Labview often uses Names to identify items (queues, images, semaphores,..... timing sources(?) )
    I tried to open and close another timing source with the same name.
    Et voila : I'm able to get exactly the error code you mentioned.
    Is it possible you use the same name for a second timing source and this one is closed prior to executing the timed loop you've got problems with ?
    Best regards,
    Balze
    Attachments:
    timed_loop_2010.vi ‏37 KB

  • What is error -1418 on a timed loop?

    Has anyone ever gotten error -1418 on the error terminal of timed loop?  It only executes once and I'm trying to run it on a cRIO-9004.
    There's nothing in that range listed under the timed loop error codes.
    http://zone.ni.com/reference/en-XX/help/371361F-01/lverror/timed_loop_error_codes/
    Thanks as always,
    Jim
    Solved!
    Go to Solution.

    Hi Jim,
    I belive this is what you were looking for:
    Timing Sources Available for LabVIEW Timed Loop by Platform
    Kristen H.

  • Timed loop inside a flat sequence not terminatin​g

    Inside a while loop there is an event structure.  Inside that there is a flat sequence.  On one of the frames there is a timed loop that quits after so many iterations.  The timed loop finishes but the flat sequence doesn't execute the next sequence.  What am I not doing right?

    First, you have too many local variables.  This could be leading to race conditions.
    I think you have a couple problems in the use of event structures.  It is a bad idea to put any long running code inside an event case.  It will prevent the Event Structure from handling any other events in the mean time.  You have several timed loops running that in that one sequence frame.
    But the bigger problem is the next sequence frame.  You have a while loop that only ends once all the queues are empty.  Can you guarantee that all the queues get emptied?
    You have laid out the code very neatly, but you have used a lot of odd things in there.  (Number to boolean array, to cluster, to unbundle the cluster to individual indicators.)  Why not just go from Boolean array to and index array function.  No need for the intermediate cluster conversion.  Why not set up the indicators as an indicator array and just write to them directly.
    The code is so much intertwined between when queues are created, filled, emptied, destroyed, events happen...  And this is all multiplied by at least 4 times for each camera.  And there are 4 major event structures going on.  This is a very ambitious project for an inexperience LabVIEW user.  You need to step back, get one thing working right, and design so that you can scale the architecture upward.  Many of the structures you have essentially duplicated and belong in subVI's.

  • Unrecoverable Error w/ Timed Loop

    When I use a timed loop I get an "Unrecoverable Error" (status light on FP-20xx blinks four times) after compile and run - although not immediately. When I replace the timed loops with regular while loops everything is o.k.
    TommyH

    Hi TommyH,
    Thanks for the information. I understand that all this stuff can be a little overwhelming. That's OK. We'll get through it.
    Sounds like this is a case of the code not being able to execute within the allowed amount of time. So, in this case I would suggest not using the timed loop because the code will not be able to execute within 1ms. I would suggest using the regular while loop and using a wait until next millisecond multiple timer. You will need to experiment with the code to determine how long to wait. Give this a try and let me know how it goes.
    Best Regards,
    Brooks W.
    National Instruments

  • Deterministic Timed loop

    I am right now using the PCI-6229 for some
    critical machine functions and data logging inside of a 50ms timed loop in LV8.0.
    The source of clock is the 1kHz time base from O/S.
    However the timing accuracy is
    inadequate as it varies whenever there is a mouse movement or some such
    activity. ( even though I make sure that there is no other concurrent
    program running on the WIN_XP system ) Normally for most other projects
    this is not an issue but in this particular machine I need to switch
    on/off a solenoid at 0.25 Second intervals and the resulting pressure
    curves are plotted. Even a small drag in timing flattens the curve
    Is it possible to have a hardware
    timing source ( from the PCI 6229 card ) for the Timed loop so that it
    is more deterministic on a relative term ? I know that WIN_XP is not
    real time but for the time being I am looking at getting closer to it
    without major hardware change.
    Thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    You are correct that Windows is not deterministic. While there are some things you could do to make it more deterministic, the timing errors will still effectively be unbounded. Also note although you don't see any other programs running, WinXP is always running tasks in the background that can steal CPU cycles from LabVIEW, however high LabVIEW requests its own relative priority to be.
    Your best solution will involve separating the HW timing in your DAQ board from the SW timing in your application (the timed loop). Yes, you can use your sample clock on your DAQ board as a timing source for your loop, but this is still going to be dependent on software timing and won't remove the jitter you are seeing.
    You will want your timing to be solely dependent on a continuous or finite DAQmx task that uses a sample clock. For instance, if you are using DIO lines to switch your solenoids on or off, you will want to use one of the 32 clocked DIO lines on your 6229 to do so. I believe your card has at least a 1MHz sample clock for digital stream generation, though you should doublecheck me there. You could then design your digital pattern such that you send the data out at a clocked speed. For instance, set your sample rate to be 0.25 seconds, then have your digital pattern be a finite sequence of F-T-F. The digital lines will be updated according to a HW clock on your DAQ board that is independent of Windows.
    Check the Example Finder for examples of doing clocked Digital Output.
    Jarrod S.
    National Instruments

Maybe you are looking for

  • Need "adobePDF.dll" to install licensed version of CS3 on a new windows 8.1 machine

    I'm prompted to insert the Windows VISTA disk, which I do not have. Any ideas for where to get this file, and where to place it after I do find it (if). Thank you in advance.

  • Exporting to PDF generating duplicate pages

    Post Author: raja6791 CA Forum: Exporting Hi, I have a crystal report which includes 4 sub reports. The report contains 9 pages. Which is exported to PDF. It is working fine till last week.  Now  it is generating around 60 duplicate pages of same con

  • Query Array Size

    There is a property in Oracle Forms "Query Array Size" that specifies the maximum number of records that Forms Developer should fetch from the database at one time. How to reaslize similar functionality through SQL or PL/SQL.

  • Same output file in multiple directories.

    Hi, I am working on a Proxy to File scenario where a target csv file is generated by PI. The requirement is that PI needs to generate a csv file and post that file in 4 separate directories of a same FTP server. I intend to do that using single comm

  • Accessing Windows 2008 File Service Cluster with Windows 2012R2 File Services Cluster using same SAN

    I am in the process on converting my existing Windows 2008 host servers (2 host cluster) to a Windows 2012 R2  (2 host cluster). All 4 servers will be accessing the same SAN via ISCSI.  Currently the Windows 2008 host servers are running both File se