Control of the event: how to stop the race while loop within a structure of the event

Hello

I have some problems with control of a while loop inside a structure of the event (see annex VI).

I have 3 buttons (the "Start measurement, stop, exit the program"). When a measure is running, it should be possible to stop the measure by clicking on "Stop the measure", but it does not work.

Someone at - it an idea?

Thank you very much and best regards,

Michael

Hi Michael,

create a process parallel to your measurement. You can use the design model "producer/consumer with vents. You'll find it with «File-> new...» ».

Another possibility would be to remove the "lock frontpanel" sign, in the case of event start measurement.

Mike

Tags: NI Software

Similar Questions

  • How to control a VI (with a while loop and a structure of the event) from an another VI

    Hello

    I have the main VI which I want to be driven from an another VI. But I can't do that and I don't know what is happening.

    For example: VI main, I have a while loop with a structure of the event, there is a Boolean controller controlling a Boolean LED, which is inside the structure of the event. And the other VI, there is just a Boolean controller and functions of applications to open the main VI.

    How can I control the Boolean LED in VI main, changing the State of the Boolean controller in an another VI?

    Thank you.

    There are different options, but depending on what you want to do. For this example I can't give you a specific solution.

    I do not understand why you do what you do. Why do you call your 'principle VI' dynamically? What is the advantage to do? There are also other ways to call a VI dynamically, based on real cases (for example the method "call and forget", etc...).

    In you principle VI, control you Boolean ("THATCHER") is not the case of corresponding event. This is not usually a good practice, keep it inside.

    Also, why you try to communicate with the caller and callee VI through such a way to twist? There are better ways to do it.

    In one of my projects, I use the user event to launch orders in case of case of appellant VI.

    some Associates more readings for you:

    http://www.notatamelion.com/2015/03/23/how-to-make-dynamic-subvis/

    http://forums.NI.com/T5/LabVIEW/Dr-Damien-s-development-event-structures-III-communicating-with/m-p/...

  • How to stop and start a loop for

    I got the code and a loop running in a while loop.  What I need to do, is simply to suspend the processing of the loop until a condition is met, but retains its position of iteration throughout each pause time (not necessarily time, just paused until the following condition is met).  I tried wiring of a Boolean value to "continue if true" terminal of the for loop, but the reboot of the iteration count to 0 when the loop is restarted.  Is there a way to stop the loop for and continue to the particular iteration, it is in?

    Breakpoints, conditional, or normal are intended just for debugging your code.  I had the sense of your question as you want make a break is part of the normal operation of your code.  I would NOT recommend using a breakpoint for this situation.  It would make it appear the diagram showing the breakpoint when it occurs.  A user not to mention that the programmer wouldn't know what to do in this case.

    Yes, both the inner and outer loops would shift registers.

    Implementation of a structure dealing with a small loop inside the "case of a break" is feasible.  Depends on what you are or wait while the operation of the program is "paused."

  • Extraction of the data at the request of the race while loop

    Hi all

    Can anyone help please with the attached VI. Basically, I want to add another button and every time that you press this button, I want the data inside the loop to write once to the worksheet and not at any time before. I want continuely run the loop.

    Please, try to help with a sample VI. I'm fairly new and have difficulty finding the right building blocks .

    Best regards

    Maiz

    Use a button inside the loop.  Put the code to save the data within a structure of matter inside the loop.

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


  • Stop correctly with While loop

    Hello

    I can't stop the information that moves in stages with a while loop I created (see below). I joined the program (LabView 8.5) for reference, just in case.

    Currently, whenever I press the stop button designated for the control of the scene, the stages will not stop until the last part of the scene movement pattern is complented (in this case part 7 of the stacked sequence). Now, I have tried various things, but it was the best I could do to make the stage stop at all. (all other attempts resulted in a clumsy scene movement afetr the boss or not at all stop). Any ideas on what I can do? I'm positive that comes to a while loop on the stacking sequence was probably not a good idea. I also stacked sequences are usually wrong (or it seems) but I it is rather tedious otherwise.

    Thanks for the help, Amend sorry if this question seems pretty basic, I haven't used LabVIEW much until last week.

    It's one of the reasons why the stacked sequences should be avoided at all costs!   They can ALWAYS be replaced by a state machine with several advantages.  No. 1 among the benefits to replace a sequence of stacked with a state machine is the ability to STOP a stacked sequence between state transitions should complete each picture before stopping.

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

  • Stop an application of loop within an event from the front panel

    Hi all

    I was asked to add a stop button feature to a vi wrote to someone who is no longer with us. They wrote a "loop" feature is to crunch some data and adds it to a file during each iteration of the loop for. They put that inside a structure of the event. Is there a start button that when pressed triggers the event containing this loop. The program takes a long time to run each iteration of the loop (sound using serial communications to transfer data, it crunches and then add to the save file). If the wrong file, this can take a long time to run in full. If you stop there, other issues with resetting devices, what it is communicating.

    I need to add a stop button to close the event at the end of the next iteration of the loop for. is possible for the 'down' in the loop inside the event information once it has been triggered? I have very little experience with the structure of the event other than Basic programs to test.

    See you soon,.

    Alex

    If this description does not describe the problem, I can publish a modified version of the .vi showing the basic idea of what they have done and what I want to achieve. I am unable to put the real .vi due to NDA issues.

    You can right click on your for loop and add a conditional terminal:

  • How to stop a .swf to loop?

    I need to make a batch of several Flash clip and she need to stay in .swf files. So all the flash clip one made by now Don't stop looping. When I preview the it of the CS3 Pro, it's ok. But when I export and play in my browser, it will not stop looping. How can I stop a loop of a SWF file when I export it? Can someone help me?

    Thank you

    put an end to the last keyframe on the timeline.

    Stop();

    --
    Dan Smith > adobe community expert
    http://www.dsmith.TV

    "pero20" wrote in message
    News:fgt58o$f1p$1@forums. Macromedia.com...
    > I have to do a much more of flash clip and must stay in .swf
    > files.
    > So all the flash clip one made by now Don't stop looping. When I saw it
    > by
    > the Pro CS3, it's ok. But when I export and play in my browser, it
    > don't
    > stop a loop. How can I stop a loop of a SWF file when I export it? Can do everything
    > a
    > Help me?
    >
    > Thank you
    >

  • How to stop excess buffering while watching a movie

    While trying to enjoy a movie on my computer, IT STARTS.  First buffering arrives after the first ten minutes of the film.  It takes about ten minutes to buffer.  Then, after the start of another process of buffering. This process of buffering has never stopped, it has throughout the viewing of this film. Is it possible to stop this excess buffering.

    Hello thanks for posting your problem

    We will be happy to help you

    My first question is do you watch movie online?
    If it isn't
    then you look at a tall HD movie
    If this is the case I suggest you install a good bluray player in your computers, they are built to run the files like these and they are used to buffer.
    Trust me I played a movie of 10 GB without worry
    Thank you
    concerning
  • While the loop within a box Structure runs only once a target FPGA

    I have a card OR cRIO-9012 RIO for the HIL system. I have a target FPGA file when I use a While loop within a while loop I use the box Structure to check a real condition inside I have the function of activation of the ports and selecting the analog and digital ports. But for my code the code runs only once on repeted times that we have in the LabVIEW environment.

    I also need help to optimize the code. I've seen people using While loop timed in the FPGA target I don't use in both cases.

    I've attached my FPGA with the Version of LV2012 file.

    Waiting for your comments.

    Thank you and best regards,

    Ganesha Moorthy

    You have while loops inside the structure to deal with a constant of false cable to the stop condition. These loops will obviously never stop so browse your outside while loop (containing the case structure) can never.

    This has nothing to do with the FPGA target, the same thing will happen in the development environment.

  • 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

  • Update an indicator of in while loop with event driven programs

    I'm trying to update a chart shared by several events within a Structure of the event. I would like a change in value of a button (NOPE or OK buttons in the attached example images) causes the structure of the event causes a switch between the various outputs for the chart. In the example attached, clicking the OK button will send the graph random matrices, while clicking on the button NOPE will send constant tables to the curve.

    As the process within the structure of the event is underway, I use a while loop within each of the different events in the event Structure. So there is a structure of the event, and each event have while loops in them which should update the chart outside the structure of the event (see attached images).

    This does not update the graph, the graph remains static instead, why is this? How can I configure it to work as I described above?

    In my view, a question is: How can I use the same stop button in both inside while loops. In the example images, I have two that are different, one for each of the different events.

    Thank you!


  • How to stop the remote control to the setting

    How to stop the remote control to the setting

    Disable the settings > general > accessibility > voiceover.

  • How to stop taking control in the page from popping up every time I double click on the firefox desktop icon?

    Pop - up when I double click the icon of firefox on the desktop, the home page and control of two-page fact sheet page. How to stop taking control in the page from to appear repeatedly when I double click the icon of firefox?

    You can solve this problem with the file blocklist.xml was forced to update.

    See:

Maybe you are looking for

  • Fan noise

    My fan started all of a sudden to make a very loud sound. I have reset the SMC 2 x, which did nothing. I have not made a diagnosis, no problems were detected. Please help noise is driving me crazy!

  • Motorola needs to change the settings.

    Marshmallow, notification of amd sounds, sounds of other options, there is option to toggle the sound load, that actually works for Wireless charging. Motorola needs to remove this user from asany option that got the update, are confused that it does

  • Try to put in place three monitors for Flight Sim 2009

    How can I configure three monitors with my card vid ATI Radion 6800 (two ports dvi on the back). Do I need another card or can I split the signal?

  • How change the taskbar of classic look with a modern look?

    I have a problem with the properties of my Start menu and task bar. The parameters are defined in the Start Menu (the modern look of the most recent), but they present the appearance of the classic view. How can I fix it? as parameters are set on wha

  • Laptop won't start... I hear 1 long beep and 2 short beeps

    MY LAPTOP WANT BOOT UP WHEN TURNED ON I HEAR 1 BEEP LONG AND 2 SHORT BEEBS BUT NOTHING NO SE PASSES THE SCREEN REMAINS BLACK. MY LABTOP A WINDOW VISTA OS, SOMEONE CAN HELP ME WITH THIS PROBLEM, THANKS.