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

Similar Messages

  • 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

  • Strange DAQmx Timing Source Timed Loop Error

    I have a digital edge counter fed into a timed loop. Everything works fine until I stop the loop, and stop the DAQ task. Once I restart the loop it fails with "resource is reserved". Attached is my code.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    daqloop.JPG ‏136 KB

    Here is a piece of code to illustrate the issue. If the timing source is created in the loop (it will be created each loop iteration) the error occurs. If it is moved outside the loop, and only created once the issue is resolved. Is there a way to RELEASE the timing source so that it can be created again? If the VI is stopped, this "resource" is released. I want to programatically release it.
    Note the error comes from the timed loop Error terminal that is Probed (50).
    Message Edited by bkb on 10-08-2008 09:52 AM
    Message Edited by bkb on 10-08-2008 09:53 AM
    Attachments:
    ts.jpg ‏57 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.

  • Error -50103 occured with timed loop inside a while loop

    Hello everyone,
    i wrote an application to sample analog voltage from  DAQ6024E card (see the attachments).
    I have a big while loop in the VI because a I want to add some other functions later.
    In the "WHILE_Cont Acq&Graph Voltage-Int Clk.vi" I use a while loop inside the big while loop to read the samples. It's working properly.
    but when I use a timed loop inside the big while loop (see "TIMED_LOOP_Cont Acq&Graph Voltage-Int Clk.vi"), I get an error -50103 from the timed loop.  It seems that the first cycle is ok, but after the first cycle the error occurs.
    I don't know what happens with the timed loop, anyone can help me? what does the error -50103 mean? thanks a lot!
    PS: I am using LabVIEW 8.0
    Message Edited by molo511 on 10-22-2006 05:21 AM
    Message Edited by molo511 on 10-22-2006 05:23 AM
    Attachments:
    TIMED_LOOP_Cont Acq&Graph Voltage-Int Clk.vi ‏143 KB
    WHILE_Cont Acq&Graph Voltage-Int Clk.vi ‏75 KB

    hi molo511,
    I tested your program but only with simulated devices. I had to delete the wire to the timing, so that the timed while loop runs with 1kHz. Did you already try this? Because this works on my PC.
    I also found a link in our database that might be interesting for you.
    http://digital.ni.com/public.nsf/websearch/04BEDD9E9E91ED3486256D180048116D?OpenDocument
    Greets
    Philipp N.
    NI Application Engineer

  • Memory leak in Real-Time caused by VISA Read and Timed Loop data nodes? Doesn't make sense.

    Working with LV 8.2.1 real-time to develop a host of applications that monitor or emulate computers on RS-422 busses.   The following screen shots were taken from an application that monitors a 200Hz transmission.  After a few hours, the PXI station would crash with an awesome array of angry messages...most implying something about a loss of memory.  After much hair pulling and passing of the buck, my associate was able to discover while watching the available memory on the controller that memory loss was occurring with every loop containing a VISA read and error propogation using the data nodes (see Memory Leak.jpg).  He found that if he switched the error propogation to regular old-fashioned shift registers, then the available memory was rock-solid.  (a la No Memory Leak.jpg)
    Any ideas what could be causing this?  Do you see any problems with the way we code these sorts of loops?  We are always attempting to optimize the way we use memory on our time-critical applications and VISA reads and DAQmx Reads give us the most heartache as we are never able to preallocate memory for these VIs.  Any tips?
    Dan Marlow
    GDLS
    Solved!
    Go to Solution.
    Attachments:
    Memory Leak.JPG ‏136 KB
    No Memory Leak.JPG ‏137 KB

    Hi thisisnotadream,
    This problem has been reported, and you seem to be exactly reproducing the conditions required to see this problem. This was reported to R&D (# 134314) for further investigation. There are multiple possible workarounds, one of which is the one that you have already found of wiring the error directly into the loop. Other situations that result in no memory leak are:
    1.  If the bytes at port property node is not there and a read just happens in every iteration and resulting timeouts are ignored.
    2.  If the case structure is gone and just blindly check the bytes at port and read every iteration.
    3.  If the Timed Loop is turned into a While loop.
    Thanks for the feedback!
    Regards,Stephen S.
    National Instruments
    Applications Engineering

  • Why do we lose counts through a timed loop?

    I have written a program to count the rising edges of a square wave produced by a function generator using the DAQmx functions. The counter is read in a time loop with a period of 1 second, so we take a sample once every second. It appears that the program is working correctly accept for the fact the the counts are continuously 2% lower than they should be. We are guessing that this is due to the fact that the timed loop really isn't taking a full second to complete each iteration. Any suggestions on how to fix these timing errors? The counters are read from the NI 6608 Device if that is of any help.

    Please post images of your code so that we can be off assistance.
    Thank you,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Producer consummer loop and timing loop

    Hi,
    I have to acquire 32 signals and record each signals. I would like to acquire my signals at a sample rate of 100kHz. But I tried with a different sample read and I have always an error of overwritten.
    In my producer loop I read and display all signals and in my consumer loop I record and resample my signal.
    But I thought It was maybe I haven t a timing loop in my producer and consumer loop and it slow my read in the buffer.
    So do you think my error due to I haven t timing loop? And if it s yes, where do I put my timing ? in the consumer or in the producer loop.
    Thank you very much for your response
    Romaric GIBERT

    Why did you start a new message thread?
    You were already being helped here.

  • Timed loop in LabVIEW DLL does not exit nicely

    Hello!  I have what I think is a simple timed loop in LabVIEW that exits after 100 iterations by throwing an error, and letting the loop "stop on error".  This works fine when run in the regular LabVIEW environment, however, when compiled as a Dynamic Linked Library (DLL) and called from LabWindows it forces me to terminate execution, rather than exiting nicely.  What's more, it seems to quit the actual Virtual Instrument call just fine and proceed to the next line of code, but when my main() function in LabWindows completes there must still be something not cleaned up that is causing it to not exit nicely.  Any ideas?   I've tried adding a call to QuitLabVIEW and that doesn't seem to do it.
    Thanks in advance - hoping you'll point out some really easy mistake. )
    Attached is a picture of the timed loop.
    Below is an excerpt of code from LabWindows:
     int main ()
     CallMyLabVIEWDLL();  //This line successfully launches and closes the window for my LabVIEW virtual instrument
    MessagePopup ("My Title:", "This happens after the call to your LabVIEW DLL");    //This popup shows up - indicating the call to the DLL has completed
    //But after the code has completed LabWindows still says "Running", rather than shutting down.
        return 0;
    Solved!
    Go to Solution.
    Attachments:
    LabVIEWTimedLoopDoesntExit.png ‏103 KB

    Update:  I tried the simplest possible "While" loop and it works.  If I replace it with the simplest possible Timed Loop, it doesn't.  (See attachments.) 
    The only thing I could find in a search for why a time loop would break a dll is a patch for lvalarms from LabVIEW 8.5.1 .... I'm running LV 2010 so I don't believe that's an issue.  Correct me if I'm wrong?
    Thank you!
    Attachments:
    Doesnotwork.png ‏43 KB
    DoesWork.png ‏9 KB

  • Stopping Timed Loop inside a Reentrant VI

    I just converted a project over from 8.5 to 2009 and I found that some of the funtionality that was working in 8.5 no longer works in 2009 (probably for good reason...).
    Anyway, I found that if I tried to use the stop timed loop vi to stop any timed loops in reentrant vi's that I get a -804 error. The stop timed loop sub vi was in the same reentrant vi in the application, but I found it also did not work if it was outside the reentrant vi.
    It does get a little hairy when thinking which loop you are trying to stop because of the reentrancy, but if the names passed into the instances are different for the loops then it shouldn't be a problem right?
    See attached for a very simple example of this occuring.
    Note: Just running in windows...not in RT
    Solved!
    Go to Solution.
    Attachments:
    Stop Time Loop.LLB ‏41 KB

    I resorted to using an alternative way to stop the loops as well.  Does anyone at NI know if this is a feature or a bug or if there is anyway to use the stop timed loop function with a timed loop in a reentrant vi?
    Thanks.
    Whoops... Just read your post.  Thanks for the update.
    Message Edited by klessm1 on 01-06-2010 10:55 AM

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

  • Using NI-9411 in a timed loop clock less than 40Mhz...

    Hi,
    I'm using a cRIO for motion control. I have a counter that I modified a little bit (from the softmotion examples) and once compiled (unfortunately after 1 hour ...), I have an error saying that I couldn't acheive the desired timed loop clock of 40.4 MHz... the clock rate able to acheived was 40.16 MHz (really near)...
    So I had a derived clock of 38.75MHz but this time, before compiling, i have an error saying that theses inputs can't not work at with this time loop clock...
    The timed loop counter for this encoder only have to be more than 8000 Hz (1rev/s with 8000 pulses/revolution)
    What can I do?
    Thank,
    Patrick

    I know that a 9411 device can run in a SCTL at 40Mhz.
    What I don't understand is that I can't run the loop below than 40Mhz.
    I read in the FAQ that some device can not run above 40Mhz, but in my case, I want to run in slower....
    Can it be because I'm asking the same device to run 1 SCTL with DI0, DI1, DI2 at 40Mhz and 1 other SCTL with DI3 DI4 DI5 at a different loop rate.. (38.75MHz) ...
    Thanks,
    Patrick

  • 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

  • Integrator control with timed loop

    Hi all, when dealing with discrete time control like the poleplacement method, the sampletime shouldn't necessarily be
    as short as possible like in "analog" PID-control.
    I want to be able to set the time of how often I am sensing the input and therefore I am using a timed loop.
    Something is missing in my file because it won't work.
    The propertynode DigNum is not inserted by me, but by the png-software. I have a local variable there refering to the period dt.
    Kindest regards,
    Lasse
    Attachments:
    Integrator control with Timed Loop.vi ‏118 KB

    Hi Lasse,
    "Something is missing in my file because it won't work."
    Yes, the error description is missing. What is wrong? What exactly doesn't work?
    - Instead of using locals you could use a wire or the block in the upper left of the TimedWhileLoop to get dt from it...
    - Does the loop spin as fast as you want it to spin or do the ExpressVIs slow down the execution?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for