Looping stop....!

iam having following sytax....
in my pai module...
     PROCESS AFTER INPUT.
  LOOP AT ITAB.
    CHAIN.
      FIELD ITAB-filed1.
      FIELD ITAB-field2.
      FIELD ITAB-field3.
      FIELD ITAB-SELKZ Module  ON_SELECT on request.
    endchain.
  ENDLOOP.
  MODULE LOAN_USER_COMMAND.
.....so in above coding... ithink you can under stand that SELKZ is for to selct the table control row.... so if you selct the table control row then it will go into the module followed by...SELKZ,
and here now iam modifiying above coding like this.....
     PROCESS AFTER INPUT.
  LOOP AT ITAB.
    CHAIN.
      FIELD ITAB-filed1.
      FIELD ITAB-field2.
      FIELD ITAB-field3.
      FIELD ITAB-SELKZ.
    endchain.
  ENDLOOP.
Module  ON_SELECT on request.
  MODULE LOAN_USER_COMMAND.
.......it was also properly working but....the thing is...
in first coding the loop is partially running before gointo this module....but in second part the loop is completing....so because if this  iam facing trouble inthe caluculation part which is in that module and linked with the entries of the field1 and filed2....
so now my quetio is...
     i want to stop that...
      loop in second..... one when one perticuler value is met.....but if i write if condition,...it was showing error like...if is not defined....
please answer...
Thank you,
Naveen.....

Try like this
PROCESS AFTER INPUT.
LOOP AT ITAB.
CHAIN.
FIELD ITAB-filed1.
FIELD ITAB-field2.
FIELD ITAB-field3.
endchain.
FIELD ITAB-SELKZ .
Module ON_SELECT on request.
ENDLOOP.

Similar Messages

  • For loop stop in sub vi from main vi?

    Hi! I want to control from my main vi a sub vi consisting of a stepped sine function generator. This sub vi has a for loop. The problem is that I want to have the option of terminating the loop in the sub vi from the main vi. I tryed using global variables or an event stucture. The problem is that, in both cases, the "stop" variable in my main vi is only updated after the loop terminates in the sub vi. Can anyone please help me? Thank you very much.
    Best regards,
    Diogo Montalvão (Lisbon, Portugal)

    hong2011 wrote:
    I found this thread very helpful. May I ask one thing - what is the purpose of the Occurrence?? If I try it without implementing the Occurrence (neither in main VI or subVI), labview crashes when the subVI completes its task or is stopped from the mainVI.
    A lot of things changed in the last 6 years, so this thread is a bit stale and there are a few other ways to do it. (For example we can have a FOR loop with a conditional terminal).
    You don't provide enough information to answer your question why it crashes. It would be more interesting to know what you are "using" and not what you are "not using". This is not something we can guess by elimination.
    LabVIEW should never crash, so please show us the code that crashes so NI can fix it. What LabVIEW version are you using?
    LabVIEW Champion . Do more with less code and in less time .

  • Java "loops" Stopped working

    I am a new Mac user (as of June 9) with the new MacBook Pro. A website that I access frequently that uses Java loops suddenly stopped working 3 days ago. I did not change anything..The only thing I can think of is that an automatic SW update changed something..I checked the Java preferences and the last change date was June 25, so it would appear nothing with Java changed recently..The only thing that was downloaded recently was QuickTIme R7..Is there some compatibility issue? I was going to try to uninstall the new QuickTime but I do not know if that is possible and if it is, can someone tell me how to do this? I know how to install/uninstall programs on WinXP, but obviously this is Mac 10.5.7 and I do not want to mess things up! Any suggestions on how to resolve or debug would be much appreciatged! Thanks in advance.

    Using Mac OS X and Internet/Networking:
    http://discussions.apple.com/category.jspa?categoryID=235
    TimeMachine and bootable backups are a must. Make a clone of your boot drive and then keep it off line. Mac OS X can boot from multiple drives with same OS, including external drives.
    That way, you can boot from your last month backup and test to see if it still happens.

  • Loop stop when pressing the minimize button??

    Hi,
    I've made data-acquisition VI, when i run it and press "for example" the
    minimize button of my VI it stops untill i release the minimize button, is
    there anything to avoid this?? So that when i press the minimize button that
    my vi just go's on with it's loops?
    Best Regards,
    Thijs

    > I've made data-acquisition VI, when i run it and press "for example" the
    > minimize button of my VI it stops untill i release the minimize button, is
    > there anything to avoid this?? So that when i press the minimize button that
    > my vi just go's on with it's loops?
    >
    As the other response indicated, we try to keep the loops running, but
    certain things in windows consume the UI thread, meaning that LV can't
    update the UI. You can make a simple VI that charts ten points per
    second and see if when you release the mouse the chart catches up. The
    standard way LV does execution tries to decouple the UI from the
    execution, so that the diagram can continue even while the UI is stopped.
    If this example works and your application doesn't, it is likely that
    y
    our I/O loop is interleaving UI and I/O. If the UI gets blocked for a
    period of time, such as you describe, this is when the UI blocks the
    rest of the loop. If this is the case, and this is important to you,
    you can try to separate the UI from the I/O by moving then to two
    independent loops that communicate via locals, etc.
    Greg McKaskle

  • Layer loop stops short?

    #target illustrator
    var doc = app.activeDocument;
    var allLayers = doc.layers;
    for (var i = 0; i < allLayers.length; i++) {
        allLayers[i].locked = false;
        if (allLayers[i].name == "Hypertext" || allLayers[i].name == "Taps") {
            alert("I found the " + allLayers[i].name + " layer")
        } else {
            //alert("Not the right layer")
            allLayers[i].remove();
    Can anyone tell me why my loop is stopping short?
    I am trying to delete ALL of the layers in the active document that are NOT named Hypertext or Taps.
    There are 28 layers in my document (including the 2 specific layers I want to keep).
    After I run the script that I wrote (see above script) it does in fact keep my two desired layers but it also doesn't delete all the other layers. I am left with 12 layers that need to be deleted still.
    Anyone see what I am doing wrong?
    Windows 7 64bit, CS4, JavaScript

    Thanks Larry! That worked out perfect. One small edit to your code was I had to change
    (var i = allLayers.length-1; i => 0; i--)
    to
    (var i = allLayers.length-1; i >= 0; i--)
    Final code....
    #target illustrator
    var doc = app.activeDocument;
    var allLayers = doc.layers;
    for (var i = allLayers.length-1; i>=0; i--){
        allLayers[i].locked = false;
        if (allLayers[i].name == "Hypertext" || allLayers[i].name == "Taps") {
            //alert("I found the " + allLayers[i].name + " layer")
        } else {
            //alert("Not the right layer")
            allLayers[i].remove();
    Thanks again Larry!

  • How to make this never ending loop stop!

    Somewhere in this code where im printing stars, i have a loop that i cant stop from continuing. The instrucitons say set the line<=30 and that i set line = 5 in the for loop. Im supposed to get a pyramid shape of stars made with 5 lines. IT should be adding by 2's at it goes down, such as 1,3,5,etc... Here is a picture of it.
    import chn.util.*;
    public class Pictures
      void printTable(int rows,int columns)
      {   for (int row = 1; row <= rows; row++)
       for (int col = 5; col <= columns; col++)
       System.out.println ( );
    void pyramid (int n)
       int line, spaces, stars, loop;
       for (line = 5; line <=30; line--)
          spaces = line - 1;
          for (loop = 1; loop <= spaces; loop++)
             System.out.print (" "); // print a blank space
          stars = n- line + 2;
          for (loop = 1; loop <= stars; loop++)
             System.out.print ("*");
       System.out.println();
       public static void main (String[ ] args)
          Pictures pic = new Pictures ( );
          ConsoleIO keyboard = new ConsoleIO ( );
          String get;
          pic.printTable (4, 6);
          get = keyboard.readLine ( ); // freezes the output screen to see the picture
          pic.printTable (11,12);
          get = keyboard.readLine ( );
          pic.pyramid (10);
          get = keyboard.readLine ( );
          pic.pyramid(25);
          get = keyboard.readLine ( );
    }

    for (line = 5; line <=30; line--)line will be 5, then 4, then 3, 2, 1, 0, -1, -2, ...
    And you'll keep going as long as it's <= 30. That is, it will stop when line > 30.
    How will line ever be > 30 following that pattern? (Well, it will, when it wraps from Integer.MIN_VALUE to Integer.MAX_VALUE.)
    You need to change your initial value or your terminating condition or your increment step. Up to you to figure out what's appropriate for what you're trying to do.

  • While loop stops before countdown has finished

    Hello everyone
    I have a problem with this scenario:
    What I want is, that I can enter a series of arrays and then it will choose the first row because the first cycle number is 0, the second is 1 and so on. I want this loop to continue until I've left my arrays empty. The probelm is when I test it, it immediately stops, but when I highlight everything seems to work fine.
    This is a program I'm trying to write so it can control some dosing pumps - I put in a number and weight and then it converts it into a set point % which will trigger the pumps. When the countdown is finished then it should start dosing with the next weight and time.
    I'm fairly new to labVIEW. I've tried looking everywhere but I haven't found that could help me, I count on you!
    Thank you very much
    Theis
    Solved!
    Go to Solution.
    Attachments:
    TabelTEST2.vi ‏32 KB

    Thank you very much all of you! It almost works!
    I must say that you guys put a lot of effort into helping me, I'm grateful.
    I went with this solution:
    I added the "stop 2" button, which starts everything.
    I just have a slight problem. When I want to pause I press the stop button again and it pauses. When I start again - by pressing the stop button - it resumes but I can see that it kept counting seconds while it was pause. I guess, that what I want is, that when I pause that it sends a zero signal to the pump which tells it to stop and the same with the timer. And when I start I want it to resume. Ya' follow me?
    I hope any of you guys, who have already been so helpful, can help!
    Thank you
    Theis
    Attachments:
    TabelTEST2_MOD.vi ‏36 KB

  • Just confusing about when do while loop stops............

    hi i m just a newbie
    i just got a bunch of codes here but what i m confusing is in some function
    it is like
    boolean error;
    do{
    //and here it has some code, if and else statements and error changes to true and false
    }while(error)this is the code, what i m confusing is when it stops??? it just states while(error)
    but i don't know it means it stops when error is false? or when error is true? or
    which one???,, because it just says while(error)
    but i don't know whether it means error is true or error is false;;;;;;;;

    I suggest taking your code and changing the error
    variable to flag as follows. Then read it as do
    {something} while (flag is true). If flag is true
    then you want to loop again; if flag is false you
    want to quit the loop. So, initialize flag to be true
    as default (you want to loop again). In the code
    block set flag to false when you determine you want
    to quit.
    boolean flag = true;
    do{
    //and here it has some code, if and else statements
    and error changes to true and false
    }while(flag)
    And I'd suggest that the variable named "flag" is even more non-intuitive than the original "error" variable name was.

  • Mc loop stops unexpectedly

    I am using as2 to simulate a "loop" effect for a mc on the
    stage. The mc contains text that will scroll horizontally,
    infinitely (when the text reaches its end, it starts again right
    after). There are two instances of the mc on the stage with the
    instance names: "mc_Inte01" and "mc_Inte02". They are placed
    horizontally end to end. The following code works, but freezes
    unexpectedly after a few minutes (depending on the value of my
    speed variable, higher number = sooner it stops):
    WHY!!!?

    OK we have a small misunderstanding here.  you seem to be trying to implement a Producer Consumer (Data) design pattern.  There is a good shipping example of this pattern. the consumer loop would be effectively timed by the enqueue data and the event structure is not helping the consumer loop much at all (In fact it may be obfuscating the real issue)  the consumer loop also has no means to terminate (Infinite loop) this needs to be corrected. 
    The worst sin I see is that you probably want a notifier with an array of dbls as the data type instead of the queue of scalar dbls.  Think about it for a few moments and see if a simplification of your code would occur to you by changing to that approach. 
    Jeff

  • For loop stops iterating at first page

    I have a loop that applies a paragraph style but it stops iterating at the first page of the document.
    I need it to apply the style to the entire document...can't figure out why this isn't working.
    Here is my script:
    var myDocument = app.activeDocument;
    var myParagraphStyle = myDocument.paragraphStyles.item("Paragraph Style");
    myDocument.pages.item(0).textFrames.item(0).paragraphs.item(0).appliedParagraphStyle = myParagraphStyle;
    var  paragraphs = myDocument.pages.item(0).textFrames.item(0).paragraphs
    for( i = 0; i < paragraphs.length; i++)
         var paragraph = paragraphs.item(i)
         paragraph.applyParagraphStyle(myParagraphStyle, true);
    Thank you

    myDocument.pages.item(0).textFrames.item(0).paragraphs.item(0).applied ParagraphStyle = myParagraphStyle;
    Why do you have this line, when you iterate through the paragraphs later? (BTW: between "applied" and "ParagraphStyle" is a space)
    But I think the problem is that you forgot two semicolon here:
    var  paragraphs = myDocument.pages.item(0).textFrames.item(0).paragraphs
    (BTW: you should also call it "var myParagraphs ..." or something like that.)
    and here:
    var paragraph = paragraphs.item(i)

  • My time capsule is in a continuous loop 'Stopping backup'.

    I cannot stop my Time Capsule from staying in a 'Stopping Backup' loop.
    I have reset the Time Capsule and then relinked it and set it up on the Mac, but the moment the backup starts it goes back into the loop.
    Any ideas??

    I cannot see it in Finder. However I saw a similar thread and they recommended the Disk Utility. I can see the Time Capsule there. When I tried to Verify the disc, it gave 'Error: this disc needs to be repaired' I did the repair routine and am now awaiting it 'Updating boot support partitions for the volume as required' However, I am concerned that the little clock in the menu bar is till running and it still says 'stopping backup'

  • Making a while loop stop

    I'm trying to write to a file by using a while loop. I read from the keyboard and then enter the while loop. I print to the file and then I read from the keyboard again. My problem is when I want to exit the loop by entering nothing I can't. The loop becomes infinite. Please help!!! Here is my code!!
    inputline = keyboard.readLine();//read the keyboard
    while ( inputline != null ){
    DiskOut.println( inputline );
    DiskOut.flush();
    inputline = keyboard.readLine();//read the keyboard again
    }//end while

    At a guess, it's not returning null when you hit return, but rather the return character. Try something like
    if (inputline == "" || inputline =="\n" || inputline == "\r" || inputline == null) {break;}If that works, you can take out bits to see what it is returning.

  • My rex2 loops stopped working?

    All the sudden I cant import them..it givs me some error like :
    "couldnt load rex shared library. The file may be corrupt. Please reinstall then try again. If that doesnt work contact tech support"
    then if I click "ok" it says: "What kind of file is this?"
    These things were working fine..maybe the new update effected them?
    Logic pro 7.2.3   Mac OS X (10.4.8)  

    I do know for a fact that Logic 7.2, (or one of it's updates) did require a new REX library.
    Go to Propellerheads website and make sure you have the latest REX library update. It even says it's specifically for Logic 7.2
    If that's not your situation, perhaps downloading it, and re-installing will help still...

  • How to stop execution in while loop without stopping execution of other loops in the same vi

    HI
    I am quite a novice in Labview.
    I have a problem in my project. I used a while loop inside my vi to build an array of ten values along with other loops. Then I used a stop button to stop manually the while loop. But it seems like the loop doesn't stop in the middle of the array building and so other loops in the vi doesn't work until the while loop finishes building the array and as soon as while loop execution is over, the complete vi stops. But all that I wanted was to build the array using the shift register along with the control to stop building array anytime. And not to stop execution of other structures when the while loop finishes.
    Can anyone help me?
    Rahul

    Hi Rahul,
    Modified ur Vi to work with single button.
    But the subtract case is not in any loop.
    So, once both the loops stop, the subtract case will execute only once. Depending on state of subtaract boolean at that time, corresponding case will be executed and the Vi will stop.
    so think of a logic where u can put this also in a new loop.
    Or you can also incorporate it in one of the two loops and pass the other loop's data to it.
    Let us know how you will proceed in this regard
    I am posting your VI as well a VI with my modifications VI in Labview 7.0 so that Thomas can give his suggestions too
    Plus, always keep a time delay in your while loops.
    Oh sorry, the "arrayinouttestnewfinal.vi" is the modified vi
    Regards
    Dev
    Message Edited by devchander on 01-10-2006 06:15 AM
    Message Edited by devchander on 01-10-2006 06:19 AM
    Attachments:
    arrayinouttestnewfinalnew4.vi ‏59 KB
    arrayinouttestnewfinal.vi ‏63 KB

  • How do i stop a while loop

    I'm new to labview and I'm having a problem stopping a while loop (running windows XP/2000 with the student edition of labview express 7).
    I'm doing a data acquisition program where I'm constantly reading in voltage and comparing it to a set point value, when the input voltage goes above the set point, i want the while loop to stop. How do I do this? I already have an LED going on when the criteria is met, but I'm not sure how to actually stop the loop (i.e. change the iteration value from true to false-i guess). If anyone can please assist me with this I would very much appreciate it.
    I've included my program too.
    Attachments:
    CO_Detection_Monitoring_System_Modified.vi ‏60 KB

    Hello Everyone-
    I've just posted a message about stopping a while loop and it was answered accurately and quickly- thanks to LV_Pro and PauloM- thanks much- its nice too see that there are many helpful people out there! Unfortunately, I have 2 more questions to ask of the forum.
    My application is almost completed- I just need to add an elapsed time counter that will tell me how long it took for my LED to trigger (from my set point-i.e. when from 0:00:00 until when my loop stopped).
    Now I've found a perfect elapsed time counter on the NI web site contributed from Mike Hall from Ohmeda Medical- the page is here.... http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D37E2493DC333076E034080020E74861&p_node=DZ52032&p_source=external
    So my first question is, it looks like I can just extend the while loop box in my 'CO detector... .vi' and paste just the code from the 'elapsed time.vi' while loop into my loop and I will be set- but do I need to change my wait until next multiple to be a 1000 too in my program? Probably, but I'm not sure hence the question- or other ideas would appreciated.
    My second question is now that my application is complete (after I add the elapsed time above), I need to exactly duplicate this process for 7 other DAQ inputs (i.e. right now I'm using only 1 of 8 analog inputs on the FP-AI110). So should I make my 'CO detector.. .vi' a separate program (I remember reading something about this in one of the posts earlier).
    Any help is very appreciated.
    Thank you again,
    Daniel
    Attachments:
    CO_Detection_Monitoring_System_Modified.vi ‏60 KB

Maybe you are looking for