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

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

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

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

Tags: NI Software

Similar Questions

  • How to run a while loop for 0.5 seconds?

    Hello

    I am doing a project and I'm stuck with the programming.

    Some time ago in a loop inside a box structure. When the real state of a structure box is enabled, the loop inside, should run for 0.5 seconds. How do this?

    Thanks in advance.

    Why you want to run a while loop? what you do inside that? If you want to perform any operation for a specific time, you can use a loop for.

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

    Hi all

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

    If this is the case, go...

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

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

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

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


  • My first while loop inside the PL/SQL block does not, please help

    Hello

    I'm new to PL/sql and struck PL SQL blocks, please help solve this problem.

    declare

    constant v_A number: = 10;
    constant number j: = 3;

    BEGIN

    WHILE j < v_A
    LOOP
    DBMS_OUTPUT. Put_line ('Hai');
    END LOOP;
    END;

    Please help as how to solve this problem.

    Thanks in advance.

    You cannot declare j as in 'permanent' If you want to increment its value. better go to another variable if you intentionally want constant j.

    Something like this:

    declare
    v_A number constant:=10 ;
    j number constant := 3 ;
    i number;
    BEGIN
    i := j;
    WHILE i < v_A
    LOOP
    i := i + 1;
    DBMS_OUTPUT.PUT_LINE('Hai');
    END LOOP;
    END;
    

    ... Vivek

    Published by: Vivek 21 Sep, 2010 02:54

  • 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)

  • How they intend to while loops

    IM an example to count the number of loops of my program did. However, it doesn't seem to work. Ive attached a DBL the i indicator in the while loop of the block diagram. I joined the program below.

    Best regards, Sam

    While the loop counter starts at zero, so if you want to know the numebr of iterations of the loop, you need to add 1 to the loop counter.

    Your loop will work also only once, if the STOP button is not pressed, since you have time condifitional called loop terminal to to continue if true.  If you press the button before running the code, it won't work twice, because you have the Boolean value set to lock, so when the loop reads the Boolean value, it will return false and stop the loop.

    I think that you want to change the conditional terminal back to interrupt if true.

  • How to run in offline mode and to avoid delays of the internet?

    I have many machines on a subnet that is unable to access the internet.

    When running the latest versions of the Adobe Reader software there are big break where the player blocks attempts to contact files.acrobat.com.

    What is everything you need uncheck on Edit/Preferences to avoid this pause.  I have already disabled the update, updates to certificate of trust and security setings for a server loading.

    Hello

    Please see the subject of the following forum once.

    How to run in offline mode and to avoid delays of the internet?

    Concerning

    Sukrit diallo

  • While loops inside while loops, how to stop?

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

     

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

  • How to stop a while loop structure in the event of a main vi

    Hello;

    Sorry for my English

    I have to stop to a Subvi my main VI, the Subvi contains a while loop and an event structure, so I need to stop this loop while I tried directly from my main vi, global variable, but it did not work

    any help please or example!

    How about something like this (solution see attachment) using a user event.

    Explore the User Interface--> range of events and dialogue. To display the dynamic event of the terminals in the structure of the event just right click and select 'display the dynamic event posts '.

  • How to reset a while loop based on a value change event?

    Hi all

    I work in a labview program that sends voltage to a laptop via USB 6008, tension is amplified by an op-amp, and then he comes back in the laptop. I created a program and a working circuit, but my current challenge is how to reset the average of the values of voltage coming into the laptop, after that the user changes the digital control (which controls the output voltage). In other words, I need to be able to reset the number of iteration and the sum to 0 each time this happens.

    I looked upward to reset the counters of iteration through shift registers, but I'm not sure it will work in this case, but I'm also not sure how to reset the sum of an array (if possible). I have spent a lot of time to read these forums and tutorials from various sites, so I think it can be done with the correct nesting of the case structures, structures of the event and while loops, but I don't know how. I am new to LV, just started to learn in mid-January, so any help is appreciated.

    Thanks in advance,

    Graeme

    You just need the structure of single event with the bargains.  Use the case of timeout to get your new values and find the average (100ms timeout value and get rid of the wait function (ms)).  Keep the amount and the number of items in the shift registers.  Wire these values through each case of the event.  In the event of changing the value: control, just set the values to 0.  Then add a Stop button value change event to stop your program.

  • How to end parallel while loops

    Hi, I'm using LV8.5.  I have 2 while loops, running in parallel.  Loop1 is faster (waiting time of 100 ms) and Loop2 is slower (several minutes waiting time).  I use a local variable (STOP button) Boolean to commonality between the loops.  The button is in the loop faster (Loop1) and the local variable is in Loop2.  When I try to end the While loop, Loop1 stops immediately, while I have to wait for Loop2 finish.  Is there a simple way to make two loops to stop immediately?  I have been using a Control\Stop Application, but may not be the right solution.

    Thank you.

    Hi shanx2,

    reduce waiting time in your second loop and count the iterations instead. The loop will do the same, but the stop will react much faster. Another possibility would be to use a queue instead. Connect to a timeout that corresponds to the current time-out period, you use and send a message to stop the loop. You can choose between the queue has been exceeded or not. Connect this result to the conditional loop. You can send the message from the queue after the first loop was arrested.

    Mike

  • run a while loop in separate vi, minimize the window flashing

    My apologies in advance for not including a VI; I cannot give it, cannot even provide screenshots.

    I have a state machine base with a cluster of Boolean values that are analyzed in the 'default' State, the scan index = true determining the next State. All other States to return to the default state. The State of 'stop' stop the loop with a Boolean constant = True, located inside the structure case wired to the time entry conditional loop (all States have a Boolean constant False wired to it). Apart from the cases

    statement, the wire connected to the conditional entry is connected to a Boolean indicator, ' Stop, in really. The time delay within the State of the machine while loop is currently set at 100 ms.

    In addition to the 'State' shift register, the state machine has a "boolean" shift register. All States, except one, feeds the value passed the Boolean value through to the next State (i.e. wired directly from left to right the structure of the case). The exception is the State which inverts the Boolean value, with the output of the inverter transferred to the State following and also connected to a Boolean flag, 'Show the State', the

    indicator outside the case statement but inside the while loop. All other States wire just the previous state of the Boolean value through the following State, unchanged.

    In addition to the State of the machine while loop, I have a parallel while loop (scourge of the LV forums). All entered conditional loop is connected to a local variable to 'stop, really. " A True/False case in this while loop structure contains a Subvi in the case of True value. The Boolean value of entry to the case statement is connected to a local variable for 'Show status'. The Subvi, which is in the real case is to display the State of the

    user.

    The Subvi which provides status through its frontage runs a script in python via a 'comand prompt"vi. The necessary update to the python command send is ~ 1/second. Within the Sub - VI is a 1 second delay time after execution of the code.

    It works but I'm doing some improvements with minimal impact on what I have.

    Two cases of VI properties that relate to the conduct of the State Subvi (floating or default, modal does not at all):

    1. with "Firm when previously closed" selected, the window switches VI (via the main switch VI) open and closed but when it is open there is the a second window flash that could cause seizures in some users.

    2. with "closes when previously closed" deselected, the window remains open and it is difficult to tell the difference between the running state and is not running. In addition, the Subvi window will not be reduced for this option.

    Is there a little invasive change, I have the code in force to stop a second flash described in #1 above and activate / deactivate the Subvi status window?

    Thank you

    Jeff


  • [begineer] reboot a 'while' loop reading the serial port

    Hello! I read some data from a COM port. I want to read my like this "%d S. the unit will send data continuously and depending on when I push the button run in labview, it can start to read data from the middle (%d is a four-digit number). as: 23 S 15'

    "whenever the first character of my data is not of", I need to restart playback. I read the data in a while loop. so I need to stop the while loop. From what I found on the internet, I used a case, another while loop and shift registers.

    but in some way I'm stuck inside the while loop. My VI is attached. Thanks in advance and sorry if my code is a mess!

    PS: what should I do if the bytes I get to the port is variable? use bytes to the port?

    The device sends a character at the end of the line at the end of each message?  You are currently Setup to do this by activating the stop character (currently set to end of line/10/0xA).  If this is true, then simply set the bytes to be read on the VISA to read something rediculously high.  It will stop playback when it finds this termination character.  From there, you just have to check for the correct format.  If this isn't the right format, ignore him.  Otherwise make your recording.

    I managed to clean up your code a bit on this basis.

  • How to move a local network printer without having to reinstall the drivers

    Hello

    Is it possible to change a printer to a network printer on a local printer without having to reinstall the printer drivers?

    The computer on which the printer (a Lanier LP116c PCL 5 c) is currently connected [directly] is running Win XP.  It is a stand-alone computer without any connectivity; network, internet ect.   He has no printer drivers installed because the computer had been connected to another computer by using working groups and was able to print at the Lanier through working groups.  But now that there is no longer connected to the 'network', but rather directly connected to the printer, it will not be printed.

    I tried to change the properties of the driver to "tell the computer" that the printer is now connected directly however when I try to open the properties I: "printer properties cannot be displayed.  The print spooler service is not running.

    How to 'know the computer' that the printer is now connected directly without having to reinstall the dirivers?

    Thank you!

    Carrie

    You have two questions.  One is assigning the correct port for the printer and the other is fixing what is originally the print spooler service to not run.

    As much as I can give you guidelines on how solve the second problem, it will be much easier for you to uninstall and reinstall the printer (once the print spooler works again) that in order to create a "USB virtual port" which is what needs to be done unless the computer was once a printer connected by USB is installed.

    Often, but not always, an order print spooler is the result of a corrupt print job stuck in the queue or a damaged printer driver.  However before you clean things up, on general principles, that you can download, install, update and run full scans with each of these two free programs:

    AntiMailware MalwareBytes
    SUPERAntiSpyware

    Do not operate the two scans simultaneously.  Each will take a long time, so start it and then go do something else for a while.

    Cleaning of printers

    NOTE: If you have ever had (but retired) a Lexmark or Dell - badged Lexmark printer installed, the command "net start spooler" to step below may fail.  In this case, type the following line in the black command prompt window and then type the command "net start spooler" again:

    dependent on the spooler of sc config = RPCSS

    Note that there is no space before the =

    If still no joy, use the alternative method that is linked below.

    A. Clean on print jobs pending

    • Open a command prompt window (start > run > cmd > OK)
    • Type the following in the black command prompt window, and then press ENTER after each line

    net stop spooler
    del/q '% windir%\system32\spool\PRINTERS\*.* '.
    net start spooler
    output

    B. clean the old printer drivers and install the latest drivers by using the directions in One Article.

    Alternative to the method of his first Article: http://members.shaw.ca/bsanders/CleanPrinterDrivers.htm

    Once the print spooler has started, click Start > printers and faxes, right click on the Lanier printer icon and select properties and select the Ports tab.  If you already have a USB connected printer installed on this computer, there should be a port named USBnnn.  If there is, check the box and OK your way out and your printer should now print when connected by USB.  If there is no USB port listed, then do the reinstall as explained in an Article.  The driver install package available here should create and install the USB port for you: http://www.lanier.com/downloads/driverFrame.aspx?path=http://support.aficio.com/bb/html/dr_ut_e/lan_u/model/c30e/c30een.htm

  • While loop inside a timed loop

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

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

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

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

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

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

    Tips welcome! Good day!

    Graziano

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

    Good day!

    Graziano

Maybe you are looking for

  • Avoid the termination email. Is it really of Apple?

    Hello I received an email allegedly from Apple with say avoid the subject termination my icloud account because I do not, that is not true. Really is the email from apple? Thank you Onezerone

  • Satellite U400-15B - noisy fan after Toshiba WIndows 7 upgrade

    Hello world Question 1:Last week, I got my Windows 7 Upgrade DVD from Toshiba. I'm leaving has upgrade and after 5 hours, the upgrade was complete. I have encountered a problem that the automated driver installed on the endgame wrong on the update of

  • probook 4540 network controller s

    Hello I am using windows 7 pro. and I have these problem 1. network controller PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103C & REV_00PCI\VEN_1814 & DEV_3290 & SUBSYS_18EC103CPCI\VEN_1814 & DEV_3290 & CC_028000PCI\VEN_1814 & DEV_3290 & CC_0280 2. bluetoot

  • 6310 all-in-one prints crooked pages-help?

    Hi... yes I checked the paper, everything prints blank but slightly twisted. Bottom of the page is tilted to the right. I tried to play with the paper to see if that helps, but nothing so far. Love my quality printer, but I look sloppy with pages twi

  • Hi my "" empty disc D ISC

    Hi my "D" drive SAIS: "this folder is empty" I don't see a 'folder '? in the properties I used 6,26 GB and I get only 362 MB? Is this general file system: NTFS that to see the files? And delete the one I don't need? Thank you