The exit of the inner loop program

Hi im new to Labview so that it sounds like an easy problem to solve.

I'm simulating a signal and display on a graph when I click on a start button. But I can't understand how, to always be able to get out all of the output of a button program as im in the inner loop, which simulates the signal. When I click on the Exit button when a simulating nothing happens until I press the button to exit the inner loop.

Here a small example vi showing my problem:

Just follow a few simple rules:

  • Do not put interactive while loops inside events
  • Don't put not events within the events.

You can use the outside loop while for everything.

Some associates of threads:

http://forums.NI.com/NI/board/message?board.ID=170&view=by_date_ascending&message.ID=388255#M388255

http://forums.NI.com/NI/board/message?board.ID=170&view=by_date_ascending&message.ID=224817#M224817

(there are many others)

Tags: NI Software

Similar Questions

  • How to quit the nested loop

    I have a nested loop

    loop1 start
    ...
    loop2 start
    ...
    end loop2
    ...
    end loop1

    I want to know how can I come out the two loops of the inner loop.

    Hello
    Out of the inner loop in the use of nested loops labels

    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7                 END LOOP inner;
      8       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
      9            END LOOP outer;
     10   END;
     11   /
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in outer Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in Inner Loop
    I am in outer Loop
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7       exit inner;
      8                 END LOOP inner;
      9       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
     10            END LOOP outer;
     11   END;
     12   /
    I am in Inner Loop
    I am in outer Loop
    I am in Inner Loop
    I am in outer Loop
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> BEGIN
      2          <>
      3            FOR i IN 1..2 LOOP
      4                 <>
      5                 FOR j IN 1..4 LOOP
      6                      DBMS_OUTPUT.PUT_LINE('I am in Inner Loop');
      7       exit outer;
      8                 END LOOP inner;
      9       DBMS_OUTPUT.PUT_LINE('I am in outer Loop');
     10            END LOOP outer;
     11   END;
     12   /
    I am in Inner Loop
    
    PL/SQL procedure successfully completed.
    

    Twinkle

  • How to stop the While loop in the Structure of the event with the same button?

    Hello

    I have a problem. I want to use a single control to activate an event in a structure of the event and the same control to end a while loop in this case.

    It is possible to use 2 controls to do this, but I need to be alone.

    Thank you

    You should NEVER place while loops inside the case of the event, and it is never necessary to do. Think about it: all you have to do is spin the code. You can easily use the outside while loop for everything. Simply place the code of the loop internal (without the inner loop) inside the case of delay and manipulate the time-out period between a pending finished and the infinite (-1), depending on the State of the Boolean value.

    A very simple example (LV 8.0)

  • The truth about the IMBRIQUEE LOOP

    Hi Experts,

    Yesterday, I looking for the differences between IN and there ARE operators. I googled and I read a thread in the site of Tom Kyte (http://asktom.oracle.com/pls/asktom/f?p=100:11:P11_QUESTION_ID:953229842074). In short, Tom wrote that the use of these two operators are different. They are also treated differently by the optimizer. IN operator works more like join two tables (hased, sorting, etc.) On the other hand, works longer EXIST as LOOP IMBRIQUEE. In other words, the inner loop runs once for each row in the outer loop. He also suggested that if the sub query is very large and high query in small. And let's say that the index of use of subquery, operator EXIST becomes much more appropriate. However, if the subquery is small FOR operator to become effective.

    In addition, Jonathan Lewis also mentions the nested loops in his book (based on Oracle Fundemantals costs) with a chapter. He says the following.

    "The execution plan of a join on the inner table index nested loops can have two different forms of 9i from: a when the optimizer uses the index on the inner table for a single scan and another when the optimizer uses the index for a range scan." The second form ceases to be an option, however, if the external table is guaranteed to return a single line. »

    My question is, if you look at the loop nested within query plans. It always works as a line returns unique index for Each row of the outer query as follows. I mean that you can come through a loop nested between two tables with FULL TABLE SCAN (usually used for this hash join). The optimizer work like this? If the join condition contains indexes between two tables and one of them is quite huge according to the other. Then the optimizer always uses NESTED LOOP rather than other join methods?

    If the above is correct, can we write the following formula?

    NESTED LOOP = QUERY EXTERNAL (a low num lines FTS) & SUB QUERY (a high number of lines with INDEX)

    ----------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    ----------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |         |     1.    58.     4 (0) | 00:00:01 |

    |   1.  NESTED LOOPS |         |       |       |            |          |

    |   2.   NESTED LOOPS |         |     1.    58.     4 (0) | 00:00:01 |

    |*  3 |    TABLE ACCESS FULL | EMP |     1.    38.     3 (0) | 00:00:01 |

    |*  4 |    INDEX UNIQUE SCAN | PK_DEPT |     1.       |     0 (0) | 00:00:01 |

    |   5.   TABLE ACCESS BY INDEX ROWID| DEPT |     1.    20.     1 (0) | 00:00:01 |

    ----------------------------------------------------------------------------------------

    Concerning

    Charlie

    The optimizer uses nested loops"when the following conditions are met:

    • The database attached to small subsets of data.
    • The join condition is an effective way to access the second table. ":

    The query optimizer

  • Force the While loop to exit when the delay is running

    Hello guys,.

    I have a While loop containing some jobs. One of them is delay for 10 seconds. When I push the stop button, the loop does not stop immediately. Instead, it stops after a few seconds (can be, pending other jobs is done).

    What can I do if I want to stop the loop immediately after I press the stop button?

    Thank you for sharing...

    Hello Yoppy,

    I don't know if I understand your problem completely, but here's the method I use to stop the while loop immediately (some ms delay will be there for you).

    I would like to know if the attachment helps.

    There are several ways to do it and you can get better solutions than this one on this community.

  • Sequence structure flat inside the timed loop and execution order

    I have some problems trying to implement a flat sequence structure when you use a loop timed on a target of cRio VI

    I tried with or without the while loop around the structure of sequence flat, and I also tried to replace the 'Non-deterministic loop' with a timed loop

    The problem is that the program seems to run only once, then get stuck somewhere

    I am writing a program that performs the following operations as soon as possible:
    1. read the Pos_MC of entry on the FPGA
    2 send the value of Pos_MC to the VI target (on cRio CPU)
    3. calculate a value of output based on Pos_MC with a PID block ("exit PID')
    4. send 'PID output' to the FPGA
    5 write "PID output" analog output "MOOG".

    In addition, I want the program to return the measured value "Pos_MC" to a host VI for the recording of data

    So that the output of PID is calculated and sent to the FPGA as quickly as possible, I placed a flat sequence structure to ensure that it happens before you send the output to the nondeterministic loop for recording data

    Also, I want the digital input 'Stop' to be able to stop the loop deterministic (the timed loop)

    I read much more entries than that and the help of several PID and exit, but I rewrote the code for a single entry and exit to make it easier to illustrate

    Screenshot of the code is shown in 'target code.png' and 'fpga code.png.

    The VI themselves are attached in the next post (cannot attach files of more than 3)

    Question 1:
    Any advice on how to get this race? Thank you!

    Question 2:
    Is also my correct understanding in that, using this structure, each 0.9ms (fpga loop time) comes the following:
    1. the input ("Pos_MOOG") is read on the fpga
    2. the production of PID is calculated on the cRio with some delay to computation (for example 0.1ms)
    3. the output of PID is then written for analog output "MOOG" in all about 0, 1 - 0.2ms
    4. the FPGA program then waits until 0.9ms spent and repeat the process

    As opposed to the next pass whenever performing a loop is started on the FPGA:

    1. the FPGA reads the input and written on the output (the output of the execution of the previous loop PID)

    2. then the entry is sent the cRio, PID output is calculated and sent to the FPGA

    3. the new release of PID is maintained until the next time through the loop

    Thank you!

    PHG wrote:

    Thanks for the input guys, any advice as to how I could get the feature in scenario 1?

    I still say that the best route is just putting all the logic of the control in the FPGA.

    Other alternatives include 1) the use of DMA FIFO sedn data back or 2) use interruptions so that the FPGA code can not read the output level until the RT.

    DMA FIFOs are usually very limited, and I would not use them in this situation since I belive said it this code to do for the many outputs.

  • final in the inner class

    I am trying to manually do a drawing similar to this program
    http://JavaFX.com/samples/draw/

    However, I'm running in final questions and internal classes.

    "size of a local variable is accessible from the inner class; must be declared final.

    He wants me to do either in SIZE or full size. However, once final, I can't change the variable.

    I have often used the variable in a loop for to assign a value (although perhaps it was a bad practice?) but I don't know the best way to handle this.

    Any suggestions?
    Thank you!


    int SIZE = 1; //somewhere else
    ...
            for( int size = 0 ; size < 5 ; size++){
                  Circle circle = new Circle(D/Padding);
                  
                  circle.setOnMousePressed(new EventHandler<MouseEvent>(){
                      public void handle(MouseEvent me){
                          SIZE = size;
                      }
                  }
             );
    Edit:
    I'm well aware that's not necessarily something specific to javafx, but more a general java programming failure.
    I also know that the mouseadapter is an anonymous class and can only access the final.

    I'm just looking for some suggestions on how to better fit this.

    Published by: namrog on July 5, 2011 10:51

    Published by: namrog on July 5, 2011 10:59
    int SIZE = 1; //somewhere else
    ...
            for( int size = 0 ; size < 5 ; size++){
                  final int size1 = size;
                  Circle circle = new Circle(D/Padding);
    
                  circle.setOnMousePressed(new EventHandler(){
                      public void handle(MouseEvent me){
                          SIZE = size1;
                      }
                  }
             );
    

    And Yes, it is a question of Java, not specific to JavaFX.
    http://Java.Sun.com/docs/books/JLS/third_edition/HTML/classes.html#247496

    DB

  • How can I remove me from the public beta program

    From Googling, it seems that I have go to System Preferences and click on App Store, where I should see an option «your computer is configured to receive seeds of pre-release software update» However, I do not see this option

    Hi Tony,.

    Looks like you want to get out of the public beta program for your Mac. Is this fair?

    This page of the FAQ has instructions for leaving the program - Apple beta software program

    Specifically -.

    How can I leave the Apple Beta software program?

    To exit the program, visit the Unenroll page and follow the instructions to remove the Apple Beta software program of your Apple ID.

    You can also reinstall a version of Mac OS X on your computer-

    How to make a version of Mac OS X on my Mac?

    Always back up your computer before you install the beta software. To obtain release of the shipment of Mac OS X on your Mac, you can simply install the final version of the software you're testing when it appears in the Mac App Store. If you want to return to a previously published version, you must first delete the beta software, then re-install the latest version of Mac OS X and finally restore from your backup Time Machine.
    Learn more about how to erase and install OS X 
    Learn more about how to restore from a Time Machine backup

    Thank you for using communities of Apple Support.

    Best for you.

  • Collection of data from more than an instrument via the same labVIEW program

    Hello

    I have a program whereby I collect data on a scale of and save the data in the text file. Now, I need to collect data of three identical scales and save the data. I wonder if it is possible to do so in the same program? I mean how to manage three ports and save three different text files?

    I enclose the current program. Communication with the scale series and I use VI:s. thanks in advance for the help = VISA)

    This is easily possible with a single program, and there are several ways to do so.  I recommend the following:

    1. Take data from these devices in a separate loop (this could be in a separate - VI, as well).  These loops should be state machines if you can start and stop the acquisitions in a clean way.  This assumes that the instruments are on separate ports.  If they are on the same port, you probably want to use the same loop.

    2. Write to the file in a single loop.  This, too, should be a state machine.

    3. Queues to send data from the acquisition of loops to the loop of file I/O.

    4. Use still another loop for your user interface.  It must contain a structure of the event.

    To do this, you will need to learn more about the State machines and producer/consumer architectures.  Start with the help of LabVIEW, then search these forums.  There are a multitude of implementations of State machines and producer/consumer architectures.  If you have the time, I highly recommend you learn and to use the classes in LabVIEW (requires LabVIEW 8.2 or later).  This will facilitate your work in the long term.

    Let us know if you encounter any problems...

  • Rate the triggered loop of the timed iterations of TTL

    Hi all

    I have a camera control VI that awaits the shutter of the camera TTL information and use it as a source of synchronization for a timed loop. In this timed loop, the camera is read and analyzed. Program should respond as soon as possible a new image and that's why I put the timed loop to "Throw missing items" so that it does not seek to catch up (events im trying to detect is quite rare and last several frames).

    The problem is this: when I put the camera for a certain numebr of frameworks (e.g. 10,000) sometimes due to discarded frames ever loop iteration number the last number of frame expected and do not remove (it remains to 9.998 for example). I noticed I can stop it by deselecting "maintain phase." However, it is clear to me what happens exactly with these settings in a situation of TTL triggered.

    It is true that the loop passes the new data directly but starts the next loop the correct number of iteration (+ 1)? Or something else happening?

    IM grateful for any help!

    Dear j.win,

    If you deselect the option 'Maintain the Original Phase', in fact you never will reject any iteration, whatever the value "Discard missed items." On the contrary, the loop will try to catch up the iterations of the end.

    Use of a source of external synchronization (for example your TTL) instead of a source of internal synchronization does not change. You can use the 'period' entrance (dt) of the loop timed to specify when the loop is supposed to go (the unit is the "ticks" in the case of an external synchronization source). A value of '1' means that test loop to iterate over all the graduations of external synchronization source. If for any reason any iteration lasts longer than that, you'll have an iteration "end". Also with a value of '1', it is not possible to change the "phase", then the parameter "Initial Phase to maintain" will be defined only weather or not ignore you the iteration. If 'Maintain initial Phase' is set to false, the loop will run immediately after an end iteration to run always, but a little of the latter. If the 'Maintain initial Phase' is true, the loop will run immediately after an iteraion end if the option 'remove point missed' is false otherwise the loop will jump the iteration.

    It's more clear now?

    Kind regards

  • Impossible to click on the buttons for the timed loop.

    Hello!

    I have a loop that is timed with a pace set by the user. And when the loop is running, I can't push any button of my GUI to stop it...

    I have to wait until a mistake or I stop the race.

    I can't put the diagram is too big and I think I don't have the right, but you have ideas?

    Ask me for more details.

    Thank you

    bejard wrote: timed loop is just in a structure of the event and I put 10 ms or 100ms.

    The program runs correctly (with this loop delay of 10ms/100 ms) like in the beginning, but I can't push any button or even change the tabs during the loop.

    You shouldn't have long extensions inside the event.  Which is supposed to stop your timed loop?

    I think that you have the option "Lock the front until the end of the occurrence" lit.  It will not press anything, until the end of everything for this case (including the timed loop).

    According to my experience, using a loop timed in a Windows system is a complete waste and often adds more overhead and questions.  Instead, I really think you need to use a State Machine.  When the button is pressed, you tell your state machine to move to the State the code inside your timed loop tracks.  You can use the State with the structure of the event to time your loop.  If you can go behind your state of event to your processing loop structure.  Just set the timeout on the structure of the event at any rate of loop you really want to.

  • LV fpga - wait express vi slows down the other loops?

    Hi all

    I have a question about the use of the vi wait Express in Labview FPGA. I use 2 loops, one that changes data, the other records it these data by sending it to a FIFO. In the first loop, I change the value of a variable named "CurrentWfmFast?" from true to false. After that, I use the vi wait Express to wait a few microseconds, so the program does not change this value to true immediately. In the second loop, I connect the data a FIFO to send to the host.

    If I now draw the variable in the host.vi, it seems that the value of the "CurrentWfmFast"? has changed AFTER the vi wait Express instead of before (see attachment).  If I change the wait ' (we) Pos Stable ' to 60000, for example, the value of "CurrentWfmFast?" changes after 60000 US... How is that possible? What is the vi wait another Express while loops influence?

    Thank you in advance,

    Best regards
    Dries

    I finally thought to it myself. Before that the value of "CurrentWfmFast?" went from true to false, the waiting already executed only once. That's why the value has not changed immediately. Instead of 1 wait, there are 2, that was my mistake.

    I know it has been difficult (if not impossible) for you to understand that without the whole project, but thanks for watching it. If I need more help, I'll post the VI or the entire project.

    Best regards

    Dries

  • Change the structure of program based on the input file

    I have a program that takes parameters of an input file and then executes a Visual acquisition, using IMAQ, controlling some other hardware at the same time.  The duration of the various stages of this process control settings.

    There is a sequence stacked structure to control the playback of the input file, the initialization of the hardware, and then a while loop on the last image to actual purchase.

    The user of the program now wish to have several games acquisition in the same race, possibly with different time settings.  This would mean different iterations of the final loop, based on the parameters of the input file.  There could be 5 games of acquisition on occasion, 3 on another, etc., in a performance of the program.

    The structure VI already seems a little baroque, and I don't want to make it even more complicated.

    I would appreciate advice on how best to proceed, because I'm really a novice of LabView.

    If you use a "State Machine" architecture, you can do exactly that.

    Instead of having a structure of stacked sequence, it is essentially a case structure in a while loop.

    Each case represents a State.

    So in your case, you would have a State for:

    -reading the input file

    -initialization of hardware

    -data acquisition

    You can have the user controls the number of iterations of the State for the acquisition of data that you want to run.

  • Table 1 d in the while loop problem

    Hello world

    I searched this problem in the forum, but seems only some positions quite didn't answer.

    I'm stuck by saving the data in a while loop.

    I have a while loop, within which there are two exits in each iteration, I want to add to a table, and then after the while loop is completed, I want to combine these two tables in a 2D array (since the release of them must be a pair in my case).

    I tried 'Build array' and 'transpose array' and 'write in spreadsheet' element set, which maintains concerns me is how simply to add the result in a 1 d table during each iteration, these 2 outputs are in digital format, which prevent to directly create a table for it.

    Any idea is appreciated,

    Thank you

    Chen Kunsheng

    Here are some other ways to insert.

    It may be useful

  • loop nested using iteration of the outer loop as counter

    Hello world.  I have a moment where I perform calculations at each iteration of the loop and display on the front panel.  Then, in a loop iteration randomly (referred to here as I = 9 to test) it fires an event where that performs calculations on x number of iterations (iterations of the outer loop while) the result of external calculations, while performing at the same time and the view from the outside so that the calculations of the loop.  Is that two mathematics algorithms are synchronized in iterations.  After x iteration the program returns then to only calculate and display the while loop calculations using the value from the shift register, updated until another event is triggered (I do not show an another event trigger in the code example) I can just find a way to trigger an event , and at the same time to make two calculations with the same loop iterations.  Any suggestions?

    The VI of the sample in the previous post of crossrulz should provide the functionality you are looking for. The while loop acts to go through ten operations you want to perform and records time difference will allow him to record these values, as you understand. I think that crossrulz refers to shift registers on the while loop that surrounds the case structure that records the shift are unusable on a structure of the case, as you pointed out.

Maybe you are looking for

  • PCDiag.exe does not work

    ? I can't get Toshiba of Diagnostic PC launch tool go with Toshiba Assist or directly viaPCDiag.exe I used EZCleaner, which has corrupted 'help and control' and I think that it messed with PC diagnosis. I have 'challenge' the EZCleaner, got help and

  • Is it possible to assign a replacement or replacing the Volume License Administrator?

    I would like to be able to assign a different "named user" in order to perform necessary VLM tasks during the long absences of work - like illness or vacation.  Doesn't it?

  • Error loading C:\WINDOWS\iutpca.dll

    When I start my computer, I get the message = Rundll error loading C:\WINDOWS\iutpca.dll the specified module could not be found

  • Wi Di?

    Dear members Please forgive my ignorance, but I want to connect my new computer windows laptop 8.1, HP Pavilion 15-n281, on my Sony HD TV so that I can watch videos on the internet etc. on the TV. I used the 'Waves Q' link on my old system of windows

  • A1720n graphics card

    I installed a xfx graphics card in an a1720n and the monitor does not receive a signal when the computer tries to start.  This prevents the boot process