Two while loops in parallel - 2 does not run

Hello

In this simple configuration, there are 2 while loops:

  • 1st - for installation
  • 2nd - operation, where variable X increments

The problem is: after 1st run variable X is not reset to X 0, if VI stops immediately after it starts.

The reason - 2nd loop is not executed, X 0 if value is not propagated to X.

Thanks in advance

Pavel

You want to first one case installation and after perform the different number of steps, based on the parameters for installation.

A perfect place for one State (a single necessary loop usually) machine. You need an idle state when waiting for user input. After that the user starts the initialization state, which calculates the number of steps for other States required. At the end the system automatically moves back to the idle state, and waiting for the user to install and launch another race.

No need to sequence meal structure at all. With a state machine, you can just do much more (like abandonment of sequence to Midway, is not possible with the structures of the sequence)

Tags: NI Software

Similar Questions

  • Code Golf: stop two while loops with guaranteed ratio iteration

    Proposal

    In the vein of the tradition of Perl, I would like to see if there is any interest to solve a few puzzles programming in LabVIEW. Can someone post a problem and define the rules to solve.

    Here's a question for beginning/intermediate to sharpen your "palette".

    Description

    With a user action, how you would stop two while loops such as the relationship between iterations is the still the same? Concrete to view this situation is to take action: both instruments use the same source of synchronization to take measures, but second divides the clock down so that it is a little slower than the first whole factor. For example, if the slower instrument is four times slower, then at the end of the VI, the slower instrument takes 100 measures the fastest instrument took 400.

    Rules

    • You can use vi.lib
    • You cannot include any other subVIs
    • Your solution should pass for loop1 interval as low as 25 ms

    Model (joint in LabVIEW 2009)

     

    If people are interested in this, then we will find a way to improve future problems. Please post your suggestions and criticisms, but only if you also post a presentation ;-)

    MacNorth wrote:

    [..]

    If we choose the first suggestions, the VI has yet to recover the data at different speeds. You can dedicate a loop for each instrument to disassociate a jitter and latency introduced by their connectivity or the inner workings. This adds a margin of safety when there is a conflict of thread and the pilot. You can also implement a simple counting as altenbach loop and renounce the multiloop complexity.
    [..]

    It is a very good point. But I wanted to make sure, you should / need to discuss the benefits, but also the disadvantages of the design. Implementation of an application is most often a process of 'special cases '. If a framework/design for a single application model does not necessarily correspond to another application.

    Designs are always strongly according to the requirements and constraints. What gives here designs will result in educational services, of course, but not necessarily as reference models for specific applications.

    Advantage of simple loop:

    • No synchronization between several loops required
    • Can easily implement any whole factor between services (quotent & function remains for a case structure

    Disadvantage of simple loop:

    • Take advantage of the multi core systems (at least not much)
    • Can easily run out of the time constraints (material not "not responding" enough, fast manipulation of data takes too long,...)
    • Code will accumulate within the structures of the case, where the readability could suff

    The advantage of multiple loops:

    • See essentially the disadvantages of single loop (several loops solve those)

    Disadvantage of multiple loops:

    • More complex, especially for the sync switch (not beginner friendly, requires a more/better design)
    • May contain easily questions source such as race conditions and locks

    A little side note:

    Even if the equipment works different acquisition rate, this does not necessarily that the software must use different rates for data extraction. You can use the same model of an hour, but get X times more values for the task faster than the slower running. The 'only' thing to care of are the sizes of buffers and bottlenecks in the data transfer.

    MacNorth wrote:

    [..] The best advice published OR shutter multiple while loops (https://www.google.com/search?q=labview+stop+multiple+while+loops) are laughable (and the 'solution' in my model). [..]

    No, it's not laughable. For many applications, this approach to shutter at the same time several loops running is OK. The constraint: only for simple parallel running loops.

    More complex loops (producer/consumer and similar) with the more complex data relationship ships require more valiant approaches such as queues, declaring events or user.

    My 5 cents only,

    Norbert

  • Stopping at two while loops, running with queuing

    Hi all

    I'm using labview 8.2.

    I have two while loops in my code (called the main loop and the other average loop - seen on the screenshot file).  I just want to stop both the while loop at the same time (it's ok it the average loop takes a bit longer).  I use global variables to stop (as I have tried the local one, but I don't think that LabView sees in the middle of the subroutine).

    Please give me some suggestions on this.

    Is attached a screenshot and my labview code

    Using a ' functional global' is almost identical with a "global" variable Indeed, before the existence of "global variables", a functional overall, it is how people have this feature.

    The usual way to stop a loop containing a "wait for queue ' is to destroy the queue and use the error on the terminal of the 'expectation of queue' directly in the terminal of the judgment. In this way, you don't have to queue up some kind of end the command to stop it.

    Add a queue to destroy after the stops 'main while loop. Delete the global variable and the error from the stop "waiting in the queue" in the loop "average" it is wire terminal.

    General advice, always try to avoid using local and global variables.

  • Touch gesture "pan two finger ' Photoshop cc 2015.1 does not

    Hello

    I use a wacom cintiq 24hd button and after I installed (upgrade) the latest version of photoshop, cc 2015.1, (Windows 8.1) a couple of touch gestures don't work as they should:

    Two fingers to pan and zoom (when using two fingers to or far away, to zoom in or out) works perfectly.

    The two fingers pan does not work: whenever I use this gesture (goes up, down, left or right) I work the photo/painting on shoots off the screen. I have to select the the hand icon and use the stylus to place it in the center of my screen;

    The two fingers of pan and rotation does not work.


    I have not had a problem using all these movements in photoshop before the recent update.


    Is that what I can do on my part that could solve these problems? If someone could help me with this, I appreciate it a lot.


    Thank you

    JerHopp

    Hi JerHopp,

    Try the following steps:

    1. create a Notepad and type:

    # Use WinTab

    UseSystemStylus 0

    Save it as a text file named PSUserConfig.txt

    2. Open Run command and type appdata, and press ENTER key

    3. go to the location:

    Roaming - Adobe - Adobe Photoshop CC2015 - Adobe Photoshop CC2015 settings

    4. move the file PSUserConfig.txt to the folder settings Adobe Photoshop CC 2015

    Kind regards

    Tanuj

  • I have a new HP Envy with Windows 8 desktop computer that still does not run properly. I rebooted, restored, ran chkdsk, sfc/scannow, uninstall/install update etc...

    I have a new HP Envy with Windows 8 desktop computer that still does not run properly. I have rebooted, restored (im doing this), ran chkdsk, sfc/scannow, malware, virus, uninstall/install etc and my machine wil always do not run for a long time without going through some sort of problem after an hour or two.  Can anyone suggest what to do about this? I read a lot of information online on all the windows 8 and fixes bugs, etc, but anything Microsoft/Windows, which ensures its customers, a hotfix or compesating their customers with software that still works. This isn't a hardware problem, and I can't keep day and bad shooting and trying to fix the day things in?

    Sincerely,
    A client who is a loss for words.
    Here are some problems in no particular order.
    1.) apps to not install it, and/or Windows saying they are when they are in fact not. The fix to install / uninstall, or get on the site of windows directly in general does not, and or does not at all.
    The change permissions 2.) does not work on files that you should be able to access in changing oxnership, permissions, etc.
    3.) Google chrome won't let me access my account of microsoft (or fact rarely) trying to access assistance. But internet Explorer doesn't?
    Randomly will increase from Internet 4.) a previous connection wired to wireless to a reboot.
    5.) my 8 'key' windows was only shown to me after that I have let Windows scan my machine online? Why? I paid for this... I restarted it and it says: service not available (it worked the third attempt which was 1-3 minutes after the initial analysis). Windows only showed my product ID not the key. I know that my victory. 8 was OEM when preinstalled I bought it new, but why didn't we files on it that had nothing to do with activation, appearing on dates for three weeks, or so before I bought it. What is the 'activation of the factory'?
    6 :) Windows Essentials does not hang for a long time, and the troubleshooterprogram of update simply does not work (I had to go to the website to try tp operate, the bluetooth functionality is not good that there is an error.
    7.) windows scan and repair gets stuck at 27% (Im not the only one with this problem).
    8.), avery MS Office 2013 Disappears so often and not easy to reload "we have encountered a problem.
     

    The computer manufacturer is responsible to see that it works properly with Windows 8. It says that it is a new computer I contact HP and make these problems their. If you don't get satisfactory results I turn and look elsewhere for a computer. Hope this helps and if you need another post to help and we will be happy to help you.

    The above opinion is mine and mine nothing and does not necessarily reflect that of Microsoft, it's employees, or any other Member of this forum.

    "When we try to take anything by itself, we find it hitched to everything else in the universe." -John Muir

  • void VI does not run with the main VI.

    My main and sub VI is attatched.

    danil33 wrote:

    Re: void / VI does not run with the main VI.

    When you start your main program, the Subvi is called and the main VI must wait the Subvi before it can continue. However, the Subvi is not set to open the Panel before, so very probably that it runs in the background for 100 seconds (1000 iteration to 100ms), because no one can press the stop button at the beginning to put an end to the Subvi. Once the Subvi is completed, the last value is returned to the main VI via the output connector and the main VI can process and display this last value. At this point, the main VI stops, because it's done (hopefully you do not "continuous operation").

    Obviously you have some misconceptions of beginners on the stream. Please we tell exactly what you expect the program to do, and we might be able to point in the right direction.

  • Windows Media player on my machine does not run some AVI files. How can I check what the problem with AVI files. Files are running in other utilities of free ware

    Windows Media player on my machine does not run some AVI files. How can I check what the problem with AVI files. Files are running in other utilities free ware. Also, windows Explorer does not display dimension and other video related information for the file. Y at - it a tool that can indicate what exactly is the problem with the file.

    Ritu

    Hello

    1. you get any error message?

    2. don't you make changes to the computer before the show?

    Please follow the steps from the link below.

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

  • Program does not run in the emulator.

    Hello, I develop in Netbeans, version 7, I use J2ME and this the first time that I try to compile an application for BlackBerry, I download all the framework I need to develop an application for BlackBerry, I'm trying to run my program and the emulator of the BlackBerry beginning but my program does not run, I have no exception and any error, please if anyone can help me Thanks in advance.

    You can publish detailed information for we can help you as your code runs only not, what your average frame, etc...

  • Dictionary of Cambridge Advanced Learner does not run on windows 7 os.

    Dictionary of Cambridge Advanced Learner does not run on windows 7 os.

    What are the 'system requirements' for this software?

    Have you tried right clicking on the shortcut to the program or the .exe and select "Run As Administrator"?  Perform, even if your user name is an administrator.

    Try right-clicking on the real Setup.exe when you are installing the program and selecting the option "Run As Administrator"?  Perform, even if your user name is an administrator.

    Make older programs in this version of Windows (Windows 7)
    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    Help with Windows 7 compatibility issues
    http://Windows.Microsoft.com/en-us/Windows7/help/compatibility

    Windows 7 Compatibility Center
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/default.aspx

  • a preparation free gata with GK Publications cd does not run on windows 7 Home Basic.

    A cd of free door preparation with GK Publications does not run on windows 7 Home Basic.

    I have buyed a book for the preparation of the door named GK Department with a cd inside, it includes the series of door documents test to practice. But it is to create an error message problem showing that Microsoft.jet.OLEDB.4.0' is not regestered on the local computer.    Please sort out the problem as soon as possible.

    Hi preyashi,

    Thanks for posting your question in the Microsoft community forum!

    I understand that you are having problems running a program from a CD on your computer. I'll help you solve the problem. To be able to understand the question in a better way, I would like to ask you a few questions.

    (1) did you make any changes before the show?

    (2) you are able to run the other Setup program on your computer?

    Senario 1:

    See if it is compatible with Windows 7.

    If this isn't the case, you could try installing in compatibility mode for Windows Vista or Windows XP.

    If the program is not compatible, then you try to install and run the program in compatibility mode.

    Use the following steps:

    (1) right click on the program.

    (2) click on Properties.

    (3) click on the tab compatibility.

    (4) select run this program in compatibility mode and select Windows Vista or other operating system, the program has been run successfully.

    Check out the link here: make sure to run older programs in this version of Windows

    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    If compatibility is not successful, then try and run the program compatibility problems:

    1. open the troubleshooting program compatibility Troubleshooter by clicking the Start button.

    Then click on Control Panel. In the search box, type troubleshooting, and then click Troubleshooting. Under programs, click on run programs for previous versions of Windows.

    2. follow the instructions in the troubleshooting.

    If you are unable to install a program, insert the installation disc for the program and, using the Troubleshoot utility, navigate to the program setup file, usually called Setup.exe, Install.exe, or something similar. This utility is not designed to work on programs that have an .msi file name extension.

    Senario 2:

    The behavior you describe is expected if your application runs in 64-bit mode, all components that use must also be 64-bit. There is no 64-bit Jet OLE DB Provider, so that you get the message as described. You will receive a similar error when you try to connect to a database by using OLE DB or ODBC if there is no 64-bit of the specified OLE DB provider or ODBC driver version.

    This problem occurs only in applications that run in 64-bit mode. Compiling the application so that it works only in 32-bit mode is the current best solution.

    You may need to contact the manufacturer of the program to find out how to set the path target to x 86.

    More information

    32-bit and 64-bit Windows: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/32-bit-and-64-bit-Windows-frequently-asked-questions

    Please let me know the status of the issue. I will be happy to provide you with the additional options that you can use to get the problem resolved in Microsoft Windows.

  • I installed acrobat reader in window10 and demoted to the 8.1 window. After downgeading 8.1, acrobat reader does not run and also do not uninstall and reinstall. Only, I get the error message. What should I do?

    I installed acrobat reader in window10 and demoted to the 8.1 window. After downgeading 8.1, acrobat reader does not run and also do not uninstall and reinstall. Only, I get the error message. What should I do?

    Hi soyoungl9536964,

    Please try to run the cleanup tool "Download Adobe Reader and Acrobat tool - Adobe Labs" on your machine to remove all traces of the reader.

    Then, restart your machine and install the latest version of the player from here:

    Adobe Acrobat Reader DC install for all versions

    Let me know if any problem will persist.

    Kind regards

    Christian

  • I tried to install cs3 on windows 10 shadow run on my mac book pro.  Technical support told me that it does not run on windows 10 but doesn't give me an opinion on whether she would go if I was running windows 7 to the people's Summit.

    I tried to install cs3 on windows 10 shadow run on my mac book pro.  Technical support told me that it does not run on windows 10 but doesn't give me an opinion on whether she would go if I was running windows 7 to the people's Summit.  Any thoughts?

    First of all, that the software is old enough so that it does not at all with Windows 10... but

    An idea that MAY work to install or run some programs in Windows old 10

    -http://www.tenforums.com/tutorials/15523-compatibility-mode-settings-apps-change-windows-1 0 - a.html

    First, that the software is old enough for that it may ALSO not work with Windows 7... but

    For Windows 7 you right click on the program and select a compatibility option in the pop-up window

  • Hello, I just downloaded creative cloud, but it does not run

    Hello, I just downloaded creative cloud, but it does not run

    Hello

    Could you please specify the error that you get when running the creative cloud, or try and attach a screenshot.

    At the same time to check if they will help you: -.

    For the white cloud screen creative,.

    Reference:-new Creative Cloud application unusable: it is empty!

    and also try:-screen black at sign - in | Creative Office Cloud app

    For spinning wheel

    Reference:-App does not open. Wheel of progress turn continuously

  • I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find the download of US feed for Acrobat 8 Professional,

    I installed Acrobat 8 Professional 32-bit version and my computer is 64-bit, the program does not run correctly and I want to uninstall the 32-bit version and re-install the 64-bit version, I can't find US downloading feed for Acrobat Professional 8, any suggestions

    Hello

    Please see below the link to download: -.

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-8-9-product-downloads.html

  • Hello: I need to install Acrobat Reader Professional 7.0. But it does not run automatically.

    Hello: I need to install Acrobat Reader Professional 7.0. But it does not run automatically.

    The installation program shows me a screen with a phone number and a series of numbers. When these numbers phone call asking me to go to the site. Does anyone know if this product can be set differently?

    If you have a license for Acrobat 7 (and it runs on an operating system), you can download the installer from https://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.ht ml and activate it with the serial number given on these pages.

Maybe you are looking for