'While Loop' inside a 'Repeater' executes only once

Hi,
I am using a 'While Loop' action inside a 'Repeater'. The while loop executes only for Repeater.CurrentItem = 1 and not for the subsequent items. Any clue?
Regards,
V M.

And the 'While_Loop.Break' = "false". Thaks for the tip.
Regards,
V M.

Similar Messages

  • How to get a case structure to execute only once in a loop

    I have a while loop that is monitoring temperature. Once the temperature meets or exceeds a given setpoint I want to start a timer. At this point I don't want to monitor the temperature anymore. That is, if the temperature should drop below the setpoint, I don't want to execute the case structure again when the temperture meets or exceeds the setpoint(the temp may oscillate about the setpoint for a given period of time). In any event, I need the case structure to execute only one time, not every iteration of the loop.

    You can put a local Boolean variable "Flag" inside that case structure and
    set "Flag" to False. Outside the case structure, use an "AND" function
    output to control the case structure. The "AND" function has two inputs. One
    goes to the comparison results between real temp and setpoint. The other
    inputs connects to the "Flag" variable. In this way, once you entered that
    case structure, the "Flag" will be turned to False, and then in next
    iteration, you won't get into the case again because the "AND" function will
    be False as your "Flag" is False now.
    Hope this helps.
    Rentian
    1. Inside the case structure, put a
    "BB Herman" wrote in message
    news:[email protected]..
    >I have a while loop that is monitori
    ng temperature. Once the
    > temperature meets or exceeds a given setpoint I want to start a timer.
    > At this point I don't want to monitor the temperature anymore. That
    > is, if the temperature should drop below the setpoint, I don't want to
    > execute the case structure again when the temperture meets or exceeds
    > the setpoint(the temp may oscillate about the setpoint for a given
    > period of time). In any event, I need the case structure to execute
    > only one time, not every iteration of the loop.

  • Event controll: How to stop a running while loop inside a event structure

    Hello,
    I have some problems with controlling a while loop inside a event structure (see attached VI).
    I habe 3 buttons ("Start Measurement, Stop Measurement, Quit Program"). When a measurement is running, it should be possible to stop the measurement by clicking on "Stop Measurement", but this does not work.
    Has anyone an idea?
    Thanks a lot and best regards,
    Michael
    Message Edited by MichaGue_01 on 04-23-2010 04:37 AM
    Solved!
    Go to Solution.
    Attachments:
    Event_Controll.vi ‏27 KB

    Hello,
    Try not to use while loops inside a Event structure.
    My approach is using two While loops (one will have only the Event structure).
    I had to use to Flag buttons that make it a bit more complicated but i am sure somebody will come up with a better idea, or you might want to have a think about it yourself.
    Have a look on the modified version on the attachment.
    Once you are happy how it works then you can Hide the 2 flag buttons from the Front Pannel by going to Block diagram right-click the indicators and choose option "Hide Indicators/Controls"
    I did it in LV 8.6 so i hope you can open it on your PC if not i can downgrade it.
    If you have any problem let us know.
    Regards
    Dimitrios
    Test Systems Computing Engineer
    Cummins Turbo-Technologies
    Attachments:
    Event_Controll[1]_modified.vi ‏18 KB

  • How can I create a one time cron schedule that would execute only once in C#?

    I have used cron schedule in C# to create an application that should trigger a job only once. This code piece is throwing an exception, An unhandled exception of type 'Quartz.SchedulerException' occurred in Quartz.dll
    Below is my code:
    class Program
    static void Main(string[] args)
    Test();
    public static void Test()
    ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
    IScheduler scheduler = schedulerFactory.GetScheduler();
    IJobDetail jobDetail = JobBuilder.Create<SatellitePaymentGenerationJob>()
    .WithIdentity("TestJob")
    .Build();
    Console.WriteLine(DateBuilder.DateOf(16, 30, 00, 24, 2, 2015));
    //ITrigger trigger = TriggerBuilder.Create()
    // .ForJob(jobDetail)
    // .WithCronSchedule("0 0 12 20 4 ? *")
    // .WithIdentity("TestTrigger")
    // .StartNow()
    // .Build();
    ITrigger trigger = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x.RepeatForever().WithRepeatCount(1))
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    scheduler.ScheduleJob(jobDetail, trigger);
    scheduler.Start();
    internal class SatellitePaymentGenerationJob : IJob
    public void Execute(IJobExecutionContext context)
    Console.WriteLine("test");
    I believe that the way I have done scheduling to be execute only once is causing the issue. Please advice.
    mayooran99

    Hi mayooran99,
    From the additional information: Repeat Interval cannot be zero. The screenshot
    as below.
    You should specify a repeat interval in seconds. 
    Please try the following code
    ITrigger triggers = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x
    .WithIntervalInSeconds(20)
    .RepeatForever())
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • Strategy plan with package to be executed only once

    Hi All,
    Created a time based maintenance plan with strategy. Included 4 maintenance packages in the strategy. One of the maintenance package should be executed only once upon scheduling the maint. plan and should be due on the date on scheduling.
    What scheduling parameters are to be maintained?
    Regards,
    Abhijit

    Hi Abhijeet,
                      The Functionality of Offset is actually different.
    Suppose you procure a new Equipment, you have erected and comissioned, but the use will anly after 3 months as the predessing and subsequent Equipment needs some time for the Erection and comissioning, in this case, you maintenance plans should start after 3 months only,
    for this reason the Offsetting Field is used.
    that is if you maintain the offseting of 3 months then the cycle will start after 3 months.
    it means that if today is 20th December and you have a cycle frequency of 1 month and you give the offseting for 3 months then your plan will be only activated from 20th march,and the first order will be generated 1 month(cycle period) after that.
    that is 20th April.
    Hope it further clarifies your doubt.
    Regards,
    Yawar Khan

  • Can't we use while loop inside a fn

    i am using a while loop inside a fn
    it is showing error
    the code is
    while (a=1) loop
    some condition
    end loop;
    the error is
    PLS-00103: Encountered the symbol "WHILE" when expecting one of
    the following:
    * & = - + < / > at in is mod not rem then <an exponent (**)>
    <> or != or ~= >= <= <> and or like between overlaps || year
    DAY_
    The symbol "*" was substituted for "WHILE" to continue.
    PLS-00103: Encountered the symbol "LOOP" when expecting one of
    the following:
    . ( * % & = - + < / > at in is mod not rem then
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between ||
    what is the error

    It looks like the OP misskeyed the assignment operator and got compilations errors, and from that assumed that you can't use WHILE loops in functions on a Tuesday.
    Message was edited by:
    William Robertson
    I was thinking of his is it possible to increment a value in a function, though I suspect the problem is similar.

  • While loop inside a timed loop

    Hi everybody!
       I'm using:
           - LV 7.1 + RealTime;
           - compactFieldpoint;
       I've noticed a strange behaviour, when I put a while loop inside a timed loop.  Let's fix timed loop with these settings:
           - 1 KHz clock
           - 1 ms period (yes, I know it's short....)
           - offset 0 ms
           - Phase 0
           - Discard missed period (ON) and MAintain original Phase (ON);
           - Timeout: -1.
       If inside this loo, I put a traditional while loop, waiting (say) for an event to occur, and if this event does not arrive, my cFP-2020 hangs! I mean, it becomes unreachable for the debugger, and, more, if I run a ping to it's address, after some cycles it becomes unreachable also from ping!
       Clearly, this code statement lock the fieldPoint, because if I remove the inner while loop all works.
      I know that with 1 ms period, timed loop always finishes late, but I set to discard missed period and timeout to -1. 
       It seems to me that sometimes Timed Loop add heavi overhead to programs, I'm turning to all while loop based tasks, even if my application has to be real-time!
       Advices welcomed! Have a nice day!
    graziano
    Solved!
    Go to Solution.

    I think the issue here is that putting your while loop inside a Timed Loop increases the priority for that task. Timed Loops can have dynamic priorities set over eachother, but they all run between Above Normal and Time Critical priority. My guess is that the debugger and built-in TCP functions run at Above Normal priority or less. This means your cFP isn't hanging, it's doing what it thinks is best. It's trying to finish this task before handling any lower-priority tasks.
    The suggestion to put a Wait function in your loop is an OK one. Keep in mind that you can actually set your wait time to zero instead of one and get the same positive benefit of handling other tasks. I would also suggest that you might look into waiting for this event in a lower priority (non-Timed) loop, and then transmit the appropriate data to your Timed Loop using an RT-FIFO or something. That might give you better handling. Just a thought....
    Jarrod S.
    National Instruments

  • Exit a while loop inside an event case

    Hi All, I have a multi-page program. One of it is used to read some analog signal via a USB block continuously.
    What I want is when clicking this page, this while loop is activated. Then we can monitor the data. When we click other pages or "Stop" button, this while loop will be terminated. And we can use the other pages to do something else.
    Right now I got difficuties in stop the while loop. I do not want to stop the running of the whole program, just want to jump out of this while loop then do other operation.
    Could anyone give me some advise how to do it? Thank you very much! 

    Hi RavensFan, thank you for your reply.Actually this is not my real code  because the original one is very very compliacted.
    In real code, the tab control you see in inside the bigger while loop, that loop makes the whole program work.
    And as what I pointed, the purpose is when I click this tab (if we do not want it to trigger, we can place another "START" button to trigger), an internal while loop inside begins to run. This while loop keeps showing the real time analog signal.
    And if I do not want to use this "real time monitoring" function, I want to click somewhere (or doing anything else that can work) to jump out of this internal while loop and keep on using some other functions of the program.
    Could you advise about that? Thank you very much! 

  • AI Read is executing only once in a while loop instead of continuously scanning the channels

    The ultimate goal is to sample 15 channels (1 at 20kHz, 9 at 1000Hz, and 5 at 100Hz). Since only one scan rate is possible, I would like to reduce the data (for both displaying and saving purposes). The decimate function does not seem to work correctly.
    Attached is the current subroutine used to 'decimate' the data. It seems to work on the first loop iteration, as seen by the data block with correct time stamps and data values, but with each additional iteration, all values are zero. Why is only one scan being used in the displaying of data?
    Attachments:
    Acquire_N_ScansNM4.llb ‏76 KB

    When you call AI Clear, the DAQ session is over. You will not get any new data by calling AI Read after an AI Clear. Move your AI Clear to the right of your while loop such that it runs after the while loop completes. Don't forget to wire an error cluster or DAQ session ID to AI Clear from inside the while loop to create the data dependency. Also, consider adding a shift register for the error cluster and some way to exit the loop on an error.
    Remember that Alliance Members are here to help. We do this stuff every day.
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • Ending a while loop inside a while loop

    How do I make a while loop run as long as the while loop that contains it is running? I tried wiring both conditional terminals to a stop button in the outer loop, but that doesnt seem to work? Is there another way?
    Thanks.

    Hi Jasonalan,
    I am not sure what you are trying to implement, but it is true that the loops are not terminating because of data dependency. The stop button in the outer loop will not be read until the inner loop terminates.
    If you wish to terminate the two nested loops using a single stop button, you should read the stop button inside the inner loop and wire it to the conditional terminals in both the inner and outer loop. Again, there is no point in doing this unless you have some other logic along with the stop button to stop the loops. If only the stop button is being used to stop both the inner and outer loops, the outer loop will only execute once. In that case, you can just use a sequence structure followed by a single while loop.

  • Is there a way to cycle a while loop on its own and only controlled by the number of cycles?

    Hello everyone, 
    Newcomer here, recenlty just took core 1 and 2 the past couple of months
    is there a way to cycle my while loop so that the daq assist receives the same outputs from the list box table? So pretty much I need the VI to be able to read the voltages and time values from the list box and then execute them, I've manage to do this, but then I need it to stop for a given time and then execute again the same voltages. This would be controlled by a control for "number of cycles" input. 
    Can someone tell me why my "Emergency Stop" button doesn't stop the VI?
    Why is my data logging only outputing one result if I have it to read ever min?
    My wave form graph isnt plotting the temperature results, does it have somthing to do with the while loop?
    I know this is a lot of questions, I'm just trying to solve this and learn from it.
    Attachments:
    TEST RIG 11 10-28-13.vi ‏298 KB

    You took core 1 and 2!!!  Please tell me NI didn't teach it.  I'm not trying to harp on you too bad because I think the instructor is more to blame.  You have many wires going the wrong direction, multple loops doing nothing, and one loop that will never stop so even if all the others did there would be no way to stop your program, a Stop button that is read only once at the start of the application and then is never read again (so stop will never work).  You have the inner loop running forever, but even if it did stop it would run the outer loop forever, your enums should be typedefed, uninitialized shift registers when not needed, dynamic data types, far too many express VIs...ouch.
    To answer your question.  If you have a while loop that needs to run 5 times, why not use a for loop? Then wire a 5 to the N terminal.  If you do have to use a while loop for what ever reason, use the i terminal as a condition to stop.  It will start at 0 and count up so a value of 4 means it will be executing the 5 time.  If the value equals 5 then stop.  Get the Array size of the Listbox and set your for loop to run for each item.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • PreparedStatement vs Statement - When executing only once

    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking about all
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement is
    used, I would expect some overhead in setting values for different columns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expect to
    any gain on performance.
    I would appreciate any comments.
    Sarat

    It also depends on the database/driver combination,several database can be
    configured to maintain a prepared statement cache at the DB level (I have
    never done it myself, but I know people who has done this. Lately I use
    mostly Oracle, for which I should not be configured an expert :)).
    Also the weblogic's prepared statement cache only caches first so many
    statements. If you have used them all up at the startup you are out of luck.
    I know you already knew that, but may be helpful to the original poster.
    .raja
    "Cameron Purdy" <[email protected]> wrote in message
    news:[email protected]..
    BTW - there is a case where prepped stmts are faster -- when they arecached
    by Weblogic's jdbc wrappers. So my previous answer can be wrong.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "sarat" <[email protected]> wrote in message
    news:3b715901$[email protected]..
    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking aboutall
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement
    is
    used, I would expect some overhead in setting values for differentcolumns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expectto
    any gain on performance.
    I would appreciate any comments.
    Sarat

  • Stopping a while loop inside a while loop

    Hello,
    I have a while loop which is inside a while loop which houses my enetire application, When stopping the inner while loop portions of my outer loop stop working, How do I setup the inner while stop that it will not interfeer with the outer while loop?
    Thanks,
    Gil,

    It sounds like he is using a simple archetecture.  But switching to a different archetecture may not be necessary.  Simply because it doesn't work, doesn't mean scrap the whole thing and start over.  He's got a bug and needs to fix it.  Is it the best archetecture to use, absolutely not, but simple or general archetectures can be effective based on the application.
    Post your VI so we can take a look and give you some pointers and suggestions for improvement.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • While loop inside a event structure

    Dear
    I have no much concepts on event structure.
    Let's assume there is a dialog box with Okay and Cancel button.
    I put the event structure for Okay and Cancel button.
    In Okay event, there is a while loop for detecting some data continuously.
    In this case, I want to use Cancel button to stop the while loop during the detection.
    How can I do to receive signal from the Cancel button?
    Thank you in advance.

    I'm not sure that the event structure should be used to handle that situation : while the OK event is executing, either the Front panel is locked and new occuring event will be stored until the OK event is completed (so the Cancel button action will not be detected !) or the Front panel is unlocked (see below *) and the Cancel button action will stop the loop, but the Cancel button event case will not be executed, since the event has already been processed in the OK case !
    You should probably use a single button to run/stop the loop, as shown in the attachment
    * While editing the event case, unmark the "Lock front panel for this event complete" at the bottom. But of course, the code in the cancel case will not run, since the event occuredMessage Edité par chilly charly le 03-31-2007 05:27 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Event button.vi ‏11 KB

Maybe you are looking for

  • External Hard Disks Windows And Mac Compatible

    I have recently bought an external hard disk, which I plan to have one 80gb partition onto which I can do regular backups of my mac hard disk onto, and then the other 220 or so just for data storage. however I want to have the 220gb readable by both

  • ObjectOutputStream

    The document says "An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream." what does "graph" mean?

  • Safari not loading fonts

    I recently added some fonts in font-book and now some fonts on pages are coming up in some unrecognizable font that looks like arabic. Can anyone help me fix this?

  • What�s wrong with this ItemListener

    Hi All, this is my first Topic, huh, :-) Platform: Win2000 SVP2, 512 MB, P IV 1,5 JDK 1.3.002 I try to catch a ItemEvent and get the following MSG: 'Exception occurred during event dispatching:' The Item is a JCheckBoxMenuItem (AnAus1) This is the Co

  • Unable to send email to different domain by JavaMail

    Hello, I'm developing a servlet application by using using JavaMail 1.2 with JDK 1.3/Resin 1.2. My application is hosted at an ASP. When I send email some addresses under my domain, there is no problem. Emails are sent successfully. But, if I send em