Timed stop loop inside a reentrant VI

I just converted a project more than 8.5 to 2009 and I found that some of the functionality that worked at the 8.5 is no longer works in 2009 (probably for a good reason...).

In any case, I found that if I tried to use the timed loop vi stop to stop any loops NI Home vi s I get an error of-804. The timed stop void loop that VI was in the same reentrant vi in the application, but I found that it doesn't if it was outside the reentrant vi.

It becomes a little hairy when thinking that loop that you try to stop because of reentrancy, but if the names passed in the instances are different for loops, then it shouldn't be a problem right?

See attachment for a very simple example of this product.

Note: Just running in windows... not in RT

Hi klessm1,

I could verify that it works in LabVIEW 8.6.1.  This problem was reported to R & D (#201244 CAR ID) for further investigations.  Thank you very much for the comments!

Tags: NI Software

Similar Questions

  • While loop inside a timed loop

    Hello world!
    I use:
    -LV 7.1 + real-time;
    -compactFieldpoint;

    When I put some time, I noticed a strange behavior, loop inside a timed loop.  Let's fix loop timed with these settings:

    -Clock 1 kHz
    -1 ms period (Yes, I know it's short...)
    -offset 0 ms
    -Stage 0
    -Take the period of absence (ON) and maintain initial Phase (ON);
    -Timeout:-1.

    So, inside the loo, I put a traditional while loop, waiting (for example) an event will occur, and if this event doesn't happen, my cFP-2020 crashes! I mean, it becomes inaccessible for the debugger, and also, if I run a ping at his address, after a few cycles it becomes inaccessible as ping!

    Obviously, that statement of code lock the fieldPoint, because if I remove the inside while loop all work.

    I know that with 1ms duration, timed loop always the finishing of the delay, but I put the scrapping period missed and timeout-1.
      
    It seems to me that sometimes timed loop add overload heavi programs, I all so that the loop according to the tasks, even if my application has be in real-time!

    Tips welcome! Good day!

    Graziano

    Thank you very much for your answer!
    I'll test the entire application and then look for the best practice... but I still think I'll replace it timed with while loops loops...

    Good day!

    Graziano

  • How to have a while loop inside a structure of matter?

    Hi all

    I would like to know how to control a while loop by using the structure of the case? I would like the person to check if the object has is in its original position or not.

    If this is the case, go...

    The object must then do its job, as mentioned in the while loop... as up and down 10blocks...

    Later, when she returns to its original position, the entire process must stop...

    I checked the forums on this http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loops-inside-a-case-structure/m-p/591259

    It is the closest, I can have... but can someone tell me how to program for this? How logic should be?


  • Stop looping when editing

    Can't seem to find where to put the option loop loop/don ' t. At the end of the timeline, playback starts and resumes playback. I want him to stop at the end and not loop (when editing). You can help me to find the setting to prevent it to continue playback from the beginning of the clip (stop looping when editing).

    First 10 items

    Win764()

    There is no direct way to stop playing to the last image.

    The end key does not work on your computer?

    Once playback has been stopped, keys, PageUp and PageDn will take you to the first image of the last element, or the first frame of the last Clip. Cursor keys will also intervene you, image by image, inside the clamp.

    Good luck

    Hunt

  • What happens when DAQmx - searches read more timed period loop?

    Hi all!

    I'm not sure how Labview manages the following situation:

    I have a loop that is timed with a period of 1000 m, it is configured to ignore the lost iterations and keep the initial phase. I created a task that needs to be read continuously at a frequency of 1 kHz. In the timed loop, there are the DAQmx - read function (analog signal, 1 channel, N samples)

    Now, if I put the number of samples per channel at 1500 for example (while it takes 1500 * 1 ms = 1500 ms > timed_loop_period to read), I noticed that the timed loop takes ~ 1500 ms to complete. The same phenomenon occurs with any other number greater than the period of the loop.

    This means that the period of the loop passes to 1500 ms? Or something different?

    Thank you!

    Best wishes

    Samuel Lopez Santamaria

    You go winding with an iteration of the loop of 2000 msec.

    An iteration of the loop will always be until he has to do.  If you tell him to keep the first phase and it works for a long time, then it will wait until the next 1000 msec happen before going to the next iteration of the loop.

    Now with your situation, later iterations cannot take it any longer.  If you are permanently data acquisition, DAQ mx buffer fills while the loop is still pending.  So when he runs again, there may already be 500 msec value of data in the buffer, and he just needs to wait another 1000 ms up to what you have acquired the total of 1500 milliseconds of data you have requested.

    The situation for the third iteration of the loop will depend on whether the other was done within the 1000 msec, or ran just a bit long.  It behaves more like the first iteration, or the 2nd iteration.

    My question is why you use it timed while loop?  What characteristic of it you need that a regular while loop is not?  I think that mixing and matching the characteristics of a timed, while the loop with your DAQ acquisition will cause a continuously variable behavior time loop which is probably not what you want, or could cause you problems down the road if you're trying to do is to get the continuous acquisition of your DAQ hardware.

  • How to open the labview with function of Labview program to stop smoking inside?

    Hi any idea how to open the labview with the Labview function program to stop smoking inside?

    I forgot to add and define the condition of the type for this program.

    If the program is an application, she closed immediately.

    If it is still the work of labview, it will go directly to editing without closing the program.

    I so need to retrieve, open it and make some changes.

    Clement

    Place the VI in a project and open it from there, then it should not autorun. App.kind application property allows you to decide whether to close or not.

    /Y

  • stop the loop inside while loop

    Hi all

    Is there a way to stop a loop within a while loop? Error-free program will stop running when you press the stop button, but I want to while loop continues to run in and only for the loop stops when the condition is met.

    Thank you!

    Hi TayAus 1.

    If you want to run the execution once? Maybe something like below? The code inside the structure of events can only run when the event source is triggered. For example, the code in the digital works only when it detects a change in the numerical value (just an example).

    When the button is selected, it should raise the event to stop as shown below:

    If you want to create the event source, create the structure of the event > right-click on the frame and select edit events dealing with this... > This should open Edit events.

    The example below is that I put the event source for the change in the value of x and x 2.

    So when x or x 2 value is changed, executes the code in the sous-schema event shown below.

    Warm greetings,

    Lennard.C

  • While loops inside while loops, how to stop?

    Hey, I'm confused with a simpler question to multiple while loops. My goal: stop or pylone2, just jump out of the small loop and stay in the big one. and if I click on stop 3. the entire program would cease... How can I do this? The following script does not at all... Thanks in advance!

     

    Yes you are completely right Mike... now, I solved the problem with another structure of the event and the Boolean variable local... Thank you very much!

  • How to make a loaded.swf to stop a loop inside a clip

    I have a .swf which loads in a video into a Flash site. The .swf has all the stops needed to play once and stop once loaded. During a test outside the clip, it does what it should, but once loaded, it loops forever and the speed is faster. How do I stop this loop?  (This only happenes to .swf that have been made in CS4, does not happen with older .swfs made in Macromedia)

    Regarding the speed of the loaded swf file, it adapts to the FPS of your FLA file.  Change the frames per second setting in the FLA and then try to publish your new SWF file.  As applying a stop action you might be able to do, but I would check with Ned question first of all in terms of if you use ActionScript 1.0, 2.0 or 3.0.

  • Create a problem of Timing Source looping deterministic RT

    I update a former 7.1 LV vi LV10 and DAQmx.  We have a deterministic timed loop, driven by a 10 kHz external clock source.  If I understand correctly, it should be possible to implement this feature using a timed loop and the vi DAQmx create calendar source.  The attached image shows how I wired it to the top.

    This vi is deployed to a system card system 6608 synchronization PXI LV 2010 (Dev 1).  I use counter 1 on the 6608 to create synchronization source.  I have an external 10 kHz square wave (5 V p - p) connected to Src1 (PFI35) on 1 Dev.

    The problem: the loop seems to use a 1 kHz clock, even though I specified the meter and the entry for a source of 10 kHz.  If I choose a frequency of 20 Hz (500 edge counts for 10 kHz clock) the actual frequency of loop is only 2 Hz.  But, the loop stops if I disconnect the 10 kHz signal, so that it uses the specified counter somehow! ??  How can this be?  Is there the necessary additional counter configuration?  I checked that the external clock signal is exactly 10 kHz with an oscilloscope.

    Thanks for any thoughts.

    Ok.  I've solved this one.  You need to wire a constant '1' at the time node of the timed loop.  The default value of '10' will run only the loop on every 10th clock pulse, so the factor of 10 decrease in the frequency of the loop.

  • Timed while loop speed?

    I apologize in advance for not posting any code, but it's a pretty important project and I think I have already reduced the problem.

    The datalogger (below) loop sends a GPIB read the command and sends the data to a queue for writing and the treatment. This VI will run only once, then the sampling frequency is sent only to the timed loop once.


    Stop that VI is shown below, which causes the loop to stop when an error occurs, an error anywhere in the project, or a stop is sent. So if an error occurs in this loop, he would be arrested.

    Now down to what happened. Technicians are coming and says there is an error window that had popped up (they did not save it unfortunately) and the recorder went VERY fast. I have read the saved data, and it shows that at 65 hours in (~ 46980 WHAT GPIB read orders), the recorder suddenly accelerated. He started at 5 seconds reading for much of the race, went to ~1.4 seconds to data point, then blazed on to 0.24 seconds until the end of the trial.

    I do not know the error, but I think it of a moot point now and might have been caused by speed upward. The big question is why my loop suddenly speed up between iterations? Any error 'should' leave the loop.

    I work to see if the error will repeat (65 hours now), but I don't know that I have conducted tests on another machine which has more than 80 hours so I'm not holding my breath.


  • How to run a while loop continuously without iterate loop inside the fi, a condition is met

    I enclose a VI that once the answer 28 comes the loop must stop and loop should continue an iteration. Can you show me a way for her

    You can stop the loop when a certain condition occurs: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/add_cond_to_for_loop/

    Add a register to offset for the while loop and to implement the feature as below:

  • What are the Causes of 'loop Hang"problem with file i/o when using timed multiple loops on one OR cRIO-9012?

    Normal 0 false false false fr X-NONE X-NONE / * Style Definitions * / table. MsoNormalTable {mso-style-name : « Table Normal » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 à 5.4pt 0 à 5.4pt ; mso-para-marge-top : 0 ; mso-para-marge-droit : 0 ; mso-para-marge-bas : 10.0pt ; mso-para-marge-left : 0 ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ;}

    I experienced a problem with an application. I think I've isolated the problem in the "Timed loop question - Source Code.zip" attached source code. A detailed list of my results are in the attached document "Timed loop detailed question - Results.docx.

    Overview - it seems to be closely related to the IO files and the use of "Timed loops" on the OR cRIO-9012

    1. If I activate the e/s in two loops, then two loops crash simultaneously

    2. If I activate only the e/s in a loop, then only this loop crashes

    3. If I activate the e/s in two loops and make a 'While' loop earrings, then it don't crash

    4. If it is wrote nothing in the file I/o, then it don't crash

    5. If the reference to the file is left open instead of opening and closing on each call, so it don't crash

    6. If I try to run it on "My Computer", then it don't crash

    7. If the IO is only activated in a loop and programmed to wait for one second between the file access, then it always crashes

    In my real application, any given row is only writing (at least) once a minute, but I couldn't still my application to plant within a period of 24 hours by writing a single error of a single loop once per minute, with a low CPU use. It was the impulse to test the seventh point above.

    It seems that the best solution was to open the reference to the file and let it open. I think it is a good practice in general and I'll do the update in the application. This should solve the problem, but it is very difficult to verify this due to the sporadic nature of the question. As such, I'd like to understand what was causing the problem so I can verify that it was fixed. So far, my attempts to create a single, coherent theory able to explain all aspects of this issue have failed.

    I just wanted to know at all that there has been a request for corrective action (CAR #214156) has filed for this issue to be fixed in a future release. This seems to be a problem with the VxWorks operating system, we use in real time. We have additional cRIO chassis which have a Pharlap OS where it does not work. For now, you can search for this CAR ID notes to see if this problem has been resolved for publication in the future.

    Currently, there are two solutions, we have identified for this problem:

    1. open the file before the loop and close it after. (recommended)
    2 perform file i/o in a normal loop and transfer data to a queue.

  • For loop inside a loop For

    Is it possible to perform all iterations of the inside of the loop for each iteration of the loop outside? I've attached a screenshot of my program if it helps. If possible can you tell me how to do it please?

    A thought I have is that I think you want these nodes of feedback reset for each iteration of the loop from the outside.  Personally, I would like to change the shift registers (it would clean your scheme a little more).

  • Slow loop inside the quick loop

    It's my first week of work with LabView so perhaps the answer is very simple.

    Here's my question:

    How can I include a slow loop (event B) inside a quick loop (event A)?

    What I would like is for event B run every 1000 milliseconds, and the event has every 100 milliseconds.

    Where event is a position control loop and event B a simple write to a file of any measure.

    Any recommendations on how I should do this?

    You can use an Express VI of time spent inside the quick loop to see if it is time to perform the slow loop.  I took the liberty to not use a loop for your "event B" because it sounded like you want just the rhythm with the event.  Place B events in the real case of the box Structure. The design of producer/consumer model is the way to go if you are developing a complex application. This will make if your problem is relatively simple.

Maybe you are looking for