How to start and stop two parallel loops?

Hello

I want to control two parallel loops with different timing in a vi. Second, it means that to start the loop 1, roll 2, stop 1 or 2 restart loop 1...

But if loop 1 turns that I can't start looping two then reverse.

Can someone help me and show what is bad in my example?

Thank you

Christian

Hello Christian,.

The reason why you can't do what you want is actually quite simple.

You have an external loop which is 'on' the two inner loops.

So when you stop one of the inner loops, the outer loop will still be in the same iteration until the other inner loop ends - stop the other inner loop.

You can see very easily if you explore the outer loop iteration count - only when both loops internal, it is incerment.

So, to do what you want, you need to make them independent - you need two external loops.

Check my attachtment, see if that's what you need.

Hope this helps,

Paulo

Tags: NI Software

Similar Questions

  • How to handle errors in two parallel loops?

    Hello

    I have a loop that contains a structure of event and a second parallel loop that reads digital inputs.

    My question is:

    (a) how can I manage the errors of the various events? So, if in event1 is a mistake that event2 presented as input and can react to this topic. Currently, all events begin with "no error".

    (b) what can I do with the second loop? It is also always startin "without error" and doesn't know anything if there is a mistake in loop1.

    Is this only possible with a global variable?

    Thx for the help

    Create a user-defined event gets triggered whenever an error occurs. The input data to the event must be a cluster of error within another cluster - you'll see why when you go to use it.

    Now create a Subvi when it is called with its cluster of input error indicating an error, it raises the event you created above, otherwise, it does nothing. Install the Subvi in two loops after everything else.

    Register for the user on the structure of your event event and put what you want to happen when an error occurs in its event handler. Probibly should give you the option of quiting. If an error occurs in each loop the same evnt will be drawn and you will have the chance to stop.

    Mike...

  • How to start and stop a task with c#?

    Guys,

    I need a help. I'm trying to reproduce a task created using Meansument & Automation Explorer. The task is very simple create a channel of digital output and send the values 0 or 1 to enable and disable a relay in my board DAQmx.

    Kind regards

    Alexander has.

    I found the solution, add a new item in solution using Add new item choose component or and together the configurations such as a task type that you need. The issue will create a class for your task, this class has all the events to start and stop a task, and you can add your new methods if necessary.

    Thank you all.

    Alexandre Albuquerque

  • How to start and stop the video capture in a state machine

    Hello

    I am a student of neuroscience and this is what I try to do: 1) trigger a camera to GigE (200 FPS), 2) start the video capture, 3) triggers a light that stays on for x milliseconds, 4) trigger a valve that will blow an air puff, 5) stop the tone and the valve at the same time and 5) stop the video capture 1 second after 4). For this, my VI is a state machine, with a State for each trigger (ex, 1 State for trigger camera 1 State of light of trigger, ect) and a statement to "stop" and a "time-out State." Everything worked except the video acquisition - the program could trigger the camera but only acquire a frame, because it was not running in a while loop and this is my first question: for an acquisition video is it always necessary to have a while loop?
    I guess the answer is Yes, so I built a loop of 'consumer' for the camera. A queue of the pre-trial 'trigger camera' in the loop of producer, I was then able to start the video capture, but now the problem is to stop it at the right time. I have an another queue in the State of 'stop' in the loop of the producer, but is not able to start the State 'stop' in the loop of consumer, I think that maybe it's because the loop of consumer gets "stuck" in the whole loop.

    I hope you can help me, the VI is attached. Thank you!

    Hello

    First of all, in your loop producer: STATE 'Stop', you use the flushing line, then there is no need to use 'item queue at the opposite end. You can use the enqueue function.

    Secondly, you said "I moved the command stop inside the while loop as you said, but it did not work. But if you look closely, you moved "Enqueue function" inside the while loop. Instead you should use Dequeue function. Please, look at the picture I posted an orderly manner.

    And remove the circled (i.e. function. Enqueue function loop of consumption, where I wrote 'Why stop here').

    Try now.

  • How to start and stop the APEX?

    Hi all! I am new to this forum and APEX too...

    We are runing (Version: Application Express 4.1.1.00.23)

    I need to reboot the server.

    How can I stop APEX graciously and start back after? Thank you!

    Kind regards

    Ghyslain salvation,

    to reinforce what Mike says. Apex is a database and, with the exception of the HTTP server application, runs entirely on the database. (Note with EPG, its all in the database) It contained in the users/schemas database and built items of data such as tables and PL/SQL packages. If the server that is running the Oracle database in which the Apex is installed needs to be restarted, the database must be stopped, which stops indeed Apex. If the HTTP server is also running on this server (ESS or earpiece of the Apex) then this should be stop as well.

    Of course, if your desire is not to stop the database, but to deny the user access to the Apex, perhaps for purposes of maintenance of database, then this can be done by stopping the HTTP server or by stopping the EPG.

    I hope it is clear now.

    André

  • How to start and stop the timer by using the keyboard.

    Hello, I would really like to help please, I have

    here to launch a program whereby I press a key

    which starts the timer and press another button to stop the timer, the

    delay is displayed and used to move an object on the phase on the delay dependant.

    Thank you

    Attach a listener of events on the stage of your film.

    stage... addEventListener (KeyboardEvent.KEY_DOWN, keyDownHandler);

    According to the http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/KeyboardEvent.html# KEY_DOWN

    1 if you want any key, so you don't need a key code.

    var myKeyBoolean = false;

    function keyDownHandler(event:KeyboardEvent) {}

    if(myKeyBoolean == false) {}

    start my Countdown

    } else {}

    Cancel and reset my timer

    }

    }

    2. If you want the same key to both use a Boolean value like this:

    var myKeyBoolean = false;

    function keyDownHandler(event:KeyboardEvent) {}

    if(Event.keycode == MyKey) {}

    if(myKeyBoolean == false) {}

    start my Countdown

    } else {}

    Cancel and reset my timer

    }

    }

    }

    3. If you want two different keys

    function keyDownHandler(event:KeyboardEvent) {}

    if(Event.keycode == myStartKey) {}

    start my Countdown

    } Else if (event.keyCode == myStopKey) {}

    Cancel and reset my timer

    }

    }

    }

  • Order /sequence to start and stop services in Version 11.1.2.

    Hi all



    Need to know the steps / order/sequence in which the 11.1.2 should be started and stopped.


    Hyperion Essbase, planning, and reporting tools

    OS - 2008 64 bit.


    If someone like automated how to start and stop it please share how do?


    Thanks in advance

    regds
    RAM

    Here is the official order:-http://download.oracle.com/docs/cd/E17236_01/epm.1112/epm_install/ch06s02.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to stop the EN icon appear in Windows 7 Pro to start and stop

    I have a language loaded on my computer.  Whenever the computer starts and stops at the icon IN displayed on the screen.  I looked in the obvious places like Start > Control Panel > clock, language and region, for a possible solution for this turn.  The language toolbar is turned off and is not reduced to a minimum or displayed anywhere.

    How can I prevent the EN icon appears?

    Thanks Omnicore you snapped.

    I don't know if that has an effect, but under keyboards, I got two installed?  The keyboard for the United States and the other for the United Kingdom.  I deleted the one for US as I am in England, applies the settings and rebooted the system.  The stop screen does not display the icon of EN, but on the home screen icon EN reappeared.

    So I applied the settings of copy on the administration tab, and after the system restarts, it erased the EN icon on hospitality and the stop of the screens.

    I appreciate you taking the time and allows you to reconfigure your computer to solve this problem for me.

  • Start and stop a loop automatically subtracted at each iteration

    Hello

    I know that there are some topics about this, but I couldn't find any solution, especially because I'm using version 7.1 and cannot open files from new version.

    My problem is the following:

    I need to load a tank of 6 to 10 in the morning, every day for 3 days. The process should start and stop automatically, which means, no funds to start or stop. Start and stop conditions come from time.

    I start with a big loop of 72 iterations, which is 72 hours.

    The tank must start at level 6, whenever he starts.

    After the departure, 1 unit must be subtracted to each iteration. That means, that the tank is level 10, at 06:00 07:00 level 9 and so on. At the end of the day, at 10:00 the fill level is equal to 2.

    The next day, the process must start again and the tank must start at level 6.

    Any suggestions? Thanks in advance.

    Hi Florian.

    Thank you for your message. That solved this problem, but in fact my VI did not work as I wanted.

    I created a new one, with and an external file from 1 to 24, repeat 3 times. Now I got it. Maybe there is a better way to do it, but it works now. Thanks for all the help. I appreciate a lot.

  • Can you start and stop the glassfish server in JDeveloper 12 c and how?

    Mr President.

    Can you start and stop the glassfish server in JDeveloper 12 c and how?

    Concerning

    have you looked at

    http://www.Java-n-me.com/2014/02/GlassFish-extension-for-JDeveloper-12C-go-live.html

  • How to create services start and stop the script of automation for different servers

    Hi all

    I want to create a file bat for automation object, start and stop services
    I have some services in 1 server and a server in 2nd and some servers in 3rd.
    has you all know that I have to follow the sequence to start and stop services can all help me in creating .bat combining 3 servers fo start and collapses of the services.

    Thanks in advance

    Concerning
    SM

    the location of your batch file should not matter

  • 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

  • Digital start and stop trigger with restart HW

    Hello

    I am trying to write a program that reads continually samples based on the rise and fall of a digital triggering.  I want the measure to start on the front of the trigger and stop on the falling edge of the trigger.  I want the data that are read to be preserved and then added with the next set of data that the trigger rises again.  I have read the tutorial "Digital start and stop trigger" and can use the reference to stop the measurement process and I looked at the example "Acq & chart voltage - Int Clk - HW Trig restarts ' that comes with LabVIEW and I can get the two of them working separately with my request.  I'm quite confused however try to put the two together (see attachment).

    If I put a "Start.vi" icon inside the while loop then I get an error "you can do this while the measure is still ongoing".  If I put it out of the loop and then the process only runs once.  I tried to put a loop structure case for restart only if necessary, but this has produced another error which the source escapes me.  Is there a standard way to do this and if so someone can point me in the direction of an example?

    See you soon,.

    Glen

    I think that in this situation, it would be preferable to use a Pause trigger.  You can use the break to stop the acquisition when the trigger was low and start when the trigger is high.  In this way, served only for the duration of your trigger pulse.  I've attached a screenshot of a VI that illustrates this principle in action.

  • Black horizontal lines on the LCD screen at a specific time during the start and stop

    Hi, I am currently using a Presario CQ61 Notebook PC.  My problem, as indicated in the title, are black lines on the LCD screen, apparently when the screen is reset or enclose itself turned off during the start and stop only. From the judgment, he produced a split second her stops the hard drive, after that the screen is black. The lines and then quickly disappear. At startup, lines appear after the Windows logo has passed and the screen went from black to start loading the login screen.

    The LCD is in perfect condition, all using the PC. No line, no discoloration, etc.. Nothing extraordinary either. The problem does occur only during these two periods, specifically. I am also unable to note the lines when I'm looking directly at the screen. I have to be standing next to the PC, at an angle.

    Now, I had this PC for a considerable amount of time, however, I never paid much attention to the screen when starting upwards or stop, so this could definitely be something that the laptop has done since I bought it. I also read on similar problems, and it could be an outdated video driver or BIOS.

    I want to just make sure that it is not a major problem. Thank you all!

    Hello

    You have a few options in my opinion please try these steps can help you solve your problem.

    1) click Start, type msconfig.exe in the start search box and press ENTER to start the System Configuration utility. Under the Services tab, click to select the hide all Microsoft services check box, and then go to tap Start , click on disable all. Click apply OK restart the device.

    (2) please visit the HP website and update the Bios and graphics drivers on the unit.

    Let us know how it goes!

    * Although I am an employee of HP, I speak for myself and not for HP.

    Click the White Star Kudos to say thank you *.

    Please check accept as Solution if it solves your problem *.

    Concerning

    Maton

  • Adding characters to start and stop in a text field?

    "For 1 d bar codes, there are two options according to the type of form to use. The forms you create in Acrobat (acroforms) can be set up to use a bar code with a standard text field. If you want to include the standard start and stop character (*) or a control character, you can use JavaScript to add them. The control character should be calculated, but that can be easily done with JavaScript. »

    How I go this. My current PDF form will make a first and last name on the form in a bar code format, but I have to add in * NML for the beginning and the other * end of the data that has been drawn from a SQL database.  example the pdf has a field named "borrower1_last_name" and who filed pulls the family name...  So I thought there should be an easy script as you say add to the properties of the field.

    post here now, because no one seems to be able to point me to the correct resourse on the reader forum.

    I answered your question last week: http://forums.adobe.com/message/4040845#4040845

    Note that the same script can be used in the event Format instead of the Validate event if you do not add the start and stop characters of the value of the field, but just what is displayed.

Maybe you are looking for