Loop While break disrupts everything

Hello everyone

I got a while loop that's supposed to take certain numbers of certain tables, then solve account in a form and data output for a certain period of time - countdown. It all works, but it is important for me that I can take a break and start again from the same point in time. It is important because I might have to take a break during the operation, and sometimes the countdown would be set for times where I would not restart the process together.

I tried to implement a pause feature, but now it does not even start. Anyone with ideas?

Thank you very much

Theis

Something like that.

Tags: NI Software

Similar Questions

  • Move items outside of loops without breaking the threads

    Hi all

    is it possible to spend a few elements and their son outside a loop without breaking the connections? He became a real pain when you have more items to move and reconnect everything one by one.

    Thank you very much!

    Today, there is no option to do this directly. Which would probably require less work is to detach the buckle, move objects and then draw the loop again, but it would depend on the amount of work is required to configure the loop (shift registers, etc.). You will probably be able to write script code to do this (or to move the code outside the loop and rewiring it), but I expect that the work required to write and test the code will be larger than the work required to do this. You could do a search for the Quick Drop 'remove and rewiring' plugin to see how it works, as it does part of the work.

    A few years ago, NEITHER showed a demo of an experimental tactile editor who had this behavior integrated, if at least they are aware of him and maybe you will see in BT at a given time.

  • Baseline of the connection Loop While

    Hello

    As in the photo below, I have reference DB connection. "Properties of connection 2" indicator displays the correct values, the same 'Properties of the connection' indicator loop while shows nothing, but the connection numbers are the same (in the probe). Structure of the event in this while loop also if it is important. Why I can't get a correct connection of while loop reference?

    I use LV2011.

    Kind regards

    Kacper


  • Computer is stuck in a reboot loop, while security updats

    ORIGINAL TITLE: reboot problem

    Computer is stuck in a reboot loop, while security updats

    Hello

    1 were there any hardware or software changes made on the computer before this problem?

    2. do you get an error message or an error code? If Yes, what is the exact full error message?

    I would suggest trying the following methods and check if it helps.

    Method 1: Try to run the system in safe mode restore.

    Step 1:
    Try to start the computer in safe mode, here is the link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Step 2:
    Once you start the computer in safe mode, try to perform the system restore and check that if it helps, here is the link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

    What are the system recovery options in Windows Vista?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

    If you were able to start your computer normally by using the system restore, then refer to the following method, and try to update your windows.

    Method 2: To help resolve the error and other messages, you can start Windows by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Note When you perform a clean boot, you may temporarily lose some functionality. When you start the computer as usual, the function returns. However, you may receive the error message, or you can experience the original behavior.

    Note: follow step 7 to reset the computer to start as usual after the boot process.

    http://support.Microsoft.com/kb/929135

    See the following help link.

    Problems with installing updates

    http://Windows.Microsoft.com/en-us/Windows7/troubleshoot-problems-with-installing-updates

    Hope this information helps.

  • Work out paragraphs in two successive loops while

    Dear experts,
    In the wake of "How to set the offset for a textrange (after a TAB)?", I have implemented the code snippet in the existing flow script (simplefied for the presentation here):

    • Read a RTF which contains two parts of paragraphs by tabs. See the file FM-biblio-collected - test.fm.
      This package contains 4 points in the first part and 3 points in the second half.
    • PGF in the first part of reading works perfectly. These all begin with [[(script lignes 10... 26)]
    • The first TFP of the second part (paragraph number 5) is already read, closing the first loop due to lack of [[at the beginning.
    • Further processing of this paragraph (script lines 27... 35) reveals that the only section not 5, but paragraph 1 is treated! (textrange in line 41 is posted to 21 votes against 22, that installs only on the first paragraph!)
    • Of course this brings us to the message on line 43

    Why don't line 29 takes the same paragraph (paragraph 5) object like it was properly taken into account in the previous last object like?

    // Have the expanded RTF file (FM-biblio-collected-test.fm) open 
    
    #target framemaker  
      
    var goRtfDoc = app.ActiveDoc;  
    var pgf = goRtfDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;  // get first pgf in flow
    var TAB = String.fromCharCode(8);               // FM has wrong ASCI for TAB
    var tabRange
    
    // --- read the temp/formatted citations --- "formatted" consist of the reference number only
      while (pgf.ObjectValid()) {
        pgfText = GetText (pgf, goRtfDoc);
        if (pgfText.substring (0,2) === "[[") {       // citation lines start with [[
          parts = pgfText.split(TAB);                 // get the two parts of the line
          parts[0] = parts[0].replace("[[", "{");     // replace [[...]] by {...} for find in user doc
          parts[0] = parts[0].replace("]]", "}");
          if (parts[1].substring (0,1) === "{") {     // this placeholder is unresolved, skip it
            nUnres += 1;
            pgf = pgf.NextPgfInFlow;
            continue;
          }
    //    gasFmtCitsRaw.push (parts[0]);              // store the placeholder citation
    //    gasFmtCitsFmt.push (parts[1]);              // store the formatted citation (just a number)
          pgf = pgf.NextPgfInFlow;
        } else { break }                              // first line of bibliography encountered
      }
    // --- read the bibliography paragraphs
      while (pgf.ObjectValid()) {                     // until end of doc
        tabRange = GetTabRange (pgf, goRtfDoc);       // Get the text range starting after the TAB to the end of the paragraph.  
    //  gaoBibliography.push(tabRange);               // store the paragraph-part in the array
        goRtfDoc.TextSelection = tabRange;      // for later use in tests
        goRtfDoc.Copy (0);                      // Check manually what can be copied
        alert ("are we OK?");
        pgf = pgf.NextPgfInFlow;
      }
    
    function GetTabRange (pgf, doc) {  
      var textLoc, textRange, findParams, tabRange;  
      textLoc = new TextLoc (pgf, 0);                 // Make a text location at the beginning of the paragraph. 
      findParams = GetFindParams ("\x08");            // Get the find parameters for finding a tab.  
      textRange = doc.Find (textLoc, findParams);     // Search for the string.  
      if (textRange.beg.obj.ObjectValid ()) {         // See if the tab was found.  
        alert (textRange.beg.obj.Unique + "    " + pgf.Unique);   //?? Is <> if cursor is not at start of pgf. 
        if (textRange.beg.obj.Unique === pgf.Unique) {// Make sure the tab is in the correct paragraph. 
          // Select the text from after the tab up to the end of the paragraph.  
          tabRange = new TextRange (new TextLoc (pgf, textRange.beg.offset+1), new TextLoc (pgf, Constants.FV_OBJ_END_OFFSET - 1));  
          return tabRange;                            // Return the text range. 
        }  
      }  
      return 0;                                       // TAB Not found
    }  
      
    function GetFindParams (string) {  
      var findParams = AllocatePropVals (1);  
      findParams[0].propIdent.num = Constants.FS_FindText;  
      findParams[0].propVal.valType = Constants.FT_String;  
      findParams[0].propVal.sval = string;  
      return findParams;  
    } // --- end of GetFindParams
      
    function GetText (textObj, doc) {
      var j, text = "", textItems;
      if (textObj.constructor.name !== "TextRange") { // Get a list of the strings in the text object or text range
        var textItems = textObj.GetText(Constants.FTI_String);
      } else {
        textItems = doc.GetTextForRange(textObj, Constants.FTI_String);
      }
      for (var j = 0; j < textItems.len; j += 1) {    // Concatenate the strings
        text += (textItems[j].sdata);
      }
      return text;                                    // Return the text
    } // --- end GetText
    
    

    All ideas are welcome

    Klaus stew

    Klaus,

    I can't explain the behavior that you see, as it appears that textLoc is ignored in line 41:

    textRange = doc. Find (textLoc, findParams);

    I don't know if it's a bug, or what is the problem. However, I have found a possible workaround. I added the following lines just before the line 41, in order to force the insertion until the beginning of the current paragraph:

    var searchStart = new TextRange (new TextLoc(pgf,0), new TextLoc (BMP, 0));

    doc. TextSelection = searchStart;

    .. like in:

    
    function GetTabRange (pgf, doc) {    
    
    var textLoc, textRange, findParams, tabRange;    
    
    textLoc = new TextLoc (pgf, 0);
    // Make a text location at the beginning of the paragraph.   
    
    findParams = GetFindParams ("\x08");
    // Get the find parameters for finding a tab.    
    
    var searchStart = new TextRange (new TextLoc (pgf,0), new TextLoc (pgf, 0));    
    
    doc.TextSelection = searchStart;
    
    textRange = doc.Find (textLoc, findParams);
    // Search for the string.    
    
    if (textRange.beg.obj.ObjectValid ()) {
    // See if the tab was found.    
    
    alert (textRange.beg.obj.Unique + "
    " + pgf.Unique);   //?? Is <> if cursor is not at start of pgf.   
    
    if (textRange.beg.obj.Unique === pgf.Unique) {// Make sure the tab is in the correct paragraph.   
    
    // Select the text from after the tab up to the end of the paragraph.    
    
    tabRange = new TextRange (new TextLoc (pgf, textRange.beg.offset+1), new TextLoc (pgf, Constants.FV_OBJ_END_OFFSET - 1));    
    
    return tabRange;
    // Return the text range.   
    
    }    
    
    }    
    
    return 0;
    // TAB Not found  
    
    }
    

    After that, the behavior of the script seems to match what you want. I hope this helps some. In addition, the code example looks like all crazy in my browser editor, don't know how it will appear when I click Add response.

    Russ

  • Control and Simulation in a loop / while loop with TCP/IP reading / writing of synchronization

    Hello, I have a problem with reading TCP/IP and written in two loops. The problem is NOT to get the two loops to read and write to and from the other. This has been accomplished. My problem is when I run control and the loop simulation on my laptop and the while on a RTOS remote on the controller on-Board of LabVIEW in a remote PXI chassis, the while loop the remote system running on four 4 times faster than the loop control and simulation on my laptop. In other words, for each iteration of the loop control and simulation on my laptop, there are 4 four iterations of the while loop on the remote system. I need to know how to get a degree of kinship (1:1) with these iterations of the loop. When I run a longer simulation in real time, say 10 seconds, the control and Simulation loop begins to slow, i.e. the simulation time slows down until it is no longer in real time and the "Late Finish"? Parameter is set to true and the LED lights and continues to stay lit. At this point, the system destabilizes due to what I believe is being well sampling rate too discreet and I have to end the simulation. How can I get a ratio of one to one between the loops and also to avoid slowing the loops causing destabilization?

    To give an overview of my application, I implement a control system in a network, seen in "image2.png". This is achieved using my laptop as a subsystem 1. Reference signals are generated from the laptop and the error signal is produced. Control measures taken and the control signals are sent via TCP/IP to the remote system. Position feedback is returned, and the process repeats. My system has Core I7 Procs w / 3 GB of RAM, up to 1 GB/s speed via ethernet and LabVIEW 2011 installed with all necessary modules and networking tools. The attached VI Custom_Wireless_Controller works on my laptop. The remote system I'm working on that has the 7830 NI R Series with FPGA card. OTN runs on the PXI chassis with an enbedded controller that has networking capabilities of up to 100 MB/s via ethernet. I use the FPGA for the acquisition of data and apply control signals to my plant. The plant is the PCE twist connected to the FPGA through the cable of the ECP - RIO of NOR. Subsystem 2 is this side of the CNE. The FPGA collects position, he sends to the controller via the network, receives signals from the network drive and writes signals to the plant power amplifier that operates the plant. This process is repeated and the VI and is titled Custom_Wireless_Plant.

    I appreciate the help really and look forward for her and for any question!

    Well, the first step is to understand what you have set up right now. Your control and Simulation loop on the side of the controller is configured as 'Runga Kutta 4' and you have a loop timed on the other side. In addition, you have the primitives of TCP/IP on the control and the Simulation diagram and means he will perform (a message) on the size of each minor step, which in your case is 4.

    So, you have two options:

    1. replace the Solver side controller Runga Kutta 1 (this must synchronize loops)

    2. hold RK 4, but create a Subvi around two primitives of TCP/IP and configure from the VI to run than the major (continuous) step-size. If you do it right, you should see a 'C' on the upper right part of the VI you have created.

    Please let me know if what I said is not clear...

  • Synchronization of 2 loops while one with a structure of the event.

    Hi fellow users of LabVIEW

    I try to incorporate a structure of the event in my current exisiting VI to Save certain values of control as shown in this post

    http://forums.NI.com/T5/LabVIEW/using-the-quot-make-current-values-default-quot-as-a-control-on/TD-p...

    It's the VI that I use as model with my exisiting VI.

    http://forums.NI.com/NI/attachments/NI/170/547715/1/defaults%20Demo.LLB

    In case the 'stop, change the value' I use in the main VI and a 'real' constant instead of Boolean control of wire structure. While the loops are not connected. The table that I use in my exisiting VI (another while loop) is indexed and unbundled to be used here.

    The work combined well screw and it gives me the results, my question is, in the long run it will give me issues. Do I still need to synchronize?

    Thanks for all the help.

    There's no problem because loop additional lower with the structure of the event.

    Personally, I worry about the top loop. Why so complicated? Why so much duplicate code? Why all these hidden indicators serve as local variables?

    Why don't simply place you the table in the entire cluster in a shift register and the index and ungroup by name wharever value, that you need to access. No hidden local variables or indicators.

  • How to create a chart using two independent loops while?

    Hello world

    I'm currently developing a program for the acquisition of data. In this program, I have two independent, while loops that each output a number of type double with each iteration of the loop. I am able to successfully create two independent waveform graphs (data / time) for each of the loops when placed inside. However, I now want to create a live data xy chart (the output of a loop is x and the output of the other is there).

    I have a problem, that the distinct nature of loops... When I try to extract data outside of the loop (naturally), it is not refresh with each iteration of the loop causing the graph xy does not work in the way I intend. Is there an easy way to solve this problem? If more clarification is needed, please let me know!

    David

    If the two loops are not synchronized, exactly how do you do the xy graph, where each point, by definition, must have a value of each loop.

    1. updated when updates or the other value and combine with the last value from the other loop?
    2. updated on a constant basis with the current value of each loop?
    3. ... There are many other possibilities.

    #2 is the easiest. Simply create a third loop with a reasonable time and graph the two values via local variables. You probably also should limit the history of ranking somehow.

  • LOOP WHILE vi main vi is not responding while void runs

    I have main VI which includes the structure of the event. When START button, I start data capture which is in WHILE loop. I want to CANCEL data entry. The ABORT button is on hand VI. But main VI is unresponsive when void VI while loop runs. How to STOP data acquisition? I can't change the structure.

    Thanks for the reply. I solved the problem. I had made a mistake. I have the structure of the event and the occurrence is common for the control 4 value change event. I had unchecked front Lock for one of the events for the control and for others it was lock the front panel. That's why it was insensitive.

  • Cannot insert (video loop while VI)

    Hi all

    I'm building a VI to count the fringes of an interferometer using a video camera of Thorlabs 1645C (with the VI UC480). The intention of VI is to count time passing a certain pixel fringe and to do this, I need a counter threshold. As can be seen in the screenshot, video array is first reduced to a single pixel (using a slider) to get a 256-bit integer that indicates the levels of gray. This gray scale should trigger an account each time it passes a certain value, but the threshold detector resets whenever the grayscale value dips below the threshold. I tried to use while loops (and other loops of types), but in these cases the video play not at all, making it useless VI. When you use the other fixtures, however, as one set, the count will be just continue to rise as long as the grayscale value is greater than the given threshold, or it is not at all.

    After a week and a half of trying, I am ideas. Could someone please help?

    Next time, I have a question, I'll post an excerpt, but since this VI needs a specific camera, run, I was thinking that showing the complete VI would not be useful.

    I think I found the solution well! (It seems to work because as far as I know)

    It turns out that I needed a bigger? block instead, in which the feedback loop has a high value for an iteration unique 'loop' (which is strange, because I have used almost the exact same set-up, but instead of the threshold detector VI, I used a Boolean value, which has been without success).

    I added a screenshot because it seems more convenient than adding a VI (due in part to compatibility etc.)

    Thanks for all the comments

  • Why these two loops while cannot work at the same time?

    I place two same while loop in the block diagram, and then use highligt and one-step run function to observe their parallel operation.

    But I discovered that this two loop operate alternately and cannot operate simultaneously.

    Can someone help me understand this?

    My software environment:

    OS: Windows XP SP3

    LabVIEW: student editions 2011

    CPU: intel P8400

    Hi, GerdW

    Thanks for the reply

    I post a video to illustrate my question.

    While I press a strong of the run, I find that these two loops does not begin at the same time.

    While the execution of a loop, the border on the other became dark.

    It seems that during an iteration in loop 1 run, the loop2 keep waiting. and then the loop2 iterate while loop1 keep waiting.

    I do not know why this happens

    Sincerely

  • Tutorial: how to stop a loop 'while' Subvi, which within the main program loop 'while '.

    Hi ppl,

    I searched through the forum on the topic above, but still don't know how to do this. Maybe one of you can post the solution of this important issue.

    I have attached a very simple program: I've done a few while loop as a main program and Subvi as a post-secondary program. Inside the Subvi also manages some while loop. All I want to do is to push the stop button in the main program that will stop the while loop in the second channel; to create a kind of judgment of reference in the main program which influence only the stop button on the Subvi. During this time the loop of the main program will still work.

    Thank you.

    I modified the code that you have joined. check.

  • How to upgrade a shift with two independent loops while register?

    Hello everyone, I have a panel with two clusters with indicators control... a left and a right. I have messages from serial port, and I'm currently updating the left and the right within their own while loops. I have a single variable, which must be updated based on updates on both sides. Basically, I need follow the last selection update on each side... If I had 1, 2 and 4 on the left side and 3 on the right side... I would need to follow 4 was the latest updated the register shift variable for uses more in my vi. Can someone give me an idea how to upgrade this a variable based on two while loops that run independently in the same sequence context? Thanks in advance, cayenne

    Thank you both of you for the suggestion.

    I managed to find a way to get the values that I needed without EI... but I read the link to the Nugget in their subject, and I can't expect a use for them in the future.

    Cayenne

  • How to continue with the loop without breaking?

    Hi people,
    I wrote a simple procedure as follows
      create or replace procedure ploop is
     vsno number;
     vsal number;
     i number:=1;
      begin
     loop
      select sno,sal into vsno,vsal from x
     where sno=i;
      dbms_output.put_line(vsno||vsal);
     i:=i+1;
    exit when i>10;
     end loop;
     end;
    
    so at execution it gives me o/p as
    SQL>  exec ploop;
    11000
    22000
    33000
    44000
    55000
    66000
    77000
    88000
    99000
    1010000
    but now suppose if I delete a record in the table X.for example sno = 6 and then if I run the above procedure, then o/p appears in the form
    SQL> exec ploop;
    11000
    22000
    33000
    44000
    55000
    BEGIN ploop; END;
    
    *
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "VIDS.PLOOP", line 16
    ORA-01403: no data found
    ORA-06512: at line 1
    So what I need is that I need the loop should be continued without breaking and should display the o/p except the lack records.can u help me pls.?


    Regarding
    VIDS

    try adding the exception like this

    create or replace procedure ploop is
     vsno number;
     vsal number;
     i number:=1;
      begin
     loop
    begin
      select sno,sal into vsno,vsal from x
     where sno=i;
      dbms_output.put_line(vsno||vsal);
    exception when no_data_found then
      null;
    end;
     i:=i+1;
    exit when i>10;
     end loop;
     end;
    
  • How to get the updated values of the loops while they are running

    Hello

    I am trouble with a very basic problem, how to access the updated values of the "loop FOR" during operation?  Basically, the VI I is currently working on two sub vis calls each sub VI has a loop for, and the two screws may or may not work for the same number of iterations. My goal is to read the values in each terminal within the loop of two sub VIs, in primary VI. I tried to do this using Global Variables, but in main VI it will display only the last iteration of the two value sub live. Could someone please tell me whrere I go wrong? Is there any other/better way to do this.

    I appreciate any input on this issue.  

    Pass a reference of the main VI control to the Sub screws.  See attached example.

Maybe you are looking for

  • Any way to disable Google safe browsing 'help '.

    Is it possible to disable the Google safe browsing feature? Or at least, replace 'Friends list' of Google with one that I actually trust?

  • Impossible to update Windows XP

    Recently installed XP home on an old copy of XP pro and I can not update at all.  I'm getting "site encountered a problem and cannot display the page."  Help?

  • Several certificates of sign in the machine

    Hello I'm building a tool that compiles blackberry applications in the cloud. The thing is, how can I install more than one certificate in the machine and compile applications using different certificates? I can see that the bbwp.exe cmd line trying

  • before that I sign for a year? Thank you for your answer

    Hello, I NEED TEN RETOURCHER PDF DOCUMENTS IN WORD? Can you GIVE ME 24 HOURS OF FREE ALTERATIONS ME BEFORE I SIGNED a YEAR, THANKS for YOUR REPLY.concerningALVAREZ [email protected](SORRY FOR MY ENGLISH)

  • First Pro CS6 Trial

    I downloaded the demo for Premiere Pro CS6 and have downloaded fine, but it wasn't on my desk.  When I go into creative cloud app it shows this:I have absolutely no idea that Acrobat X is incidentally...I watched another fourum and the adobe guy said