start stop multiple while loops

I have a fairly large VI that works while several loops with the strutures case inside.

I would like to be able to close and on all looped programmatically according to events. (complete cycle or cycle started)

I need to store my data in a table, but whenever I turned off the while loop data I gathered is lost.

It goes like this-measure analog voltage - put it in a digital indicator... now I want to put it in a table only once by my machine cycle.

If the opeator push the reset button, the table is available for acquisition of report generation.

Any help would be appreciated.

Thank you

It's here.

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

  • Stop the multiple while loops in the acquisition of Vision

    Hi, I want to close multiple while loops with a STOP. I use the software for the Acquisition of the Vision for the recording of multiple cameras and I would like to finish this record from all cameras simultaneously. I don't know how to do this since I am knew to LABView. I would add my VI here and maybe someone can help me.  Thank you!

    A local variable should be sufficient for your application. Read the following article:

    Parallel stop, while loops in LabVIEW with a stop switch

  • Stop a while loop in a sub - VI in a message in queue manager

    Hi all

    I am trying to program a control for certain manufacturing equipment. For this I use a message in queue manager. Within the QMH, I have a VI that controls a particle size probe (called a PPC, at the bottom of the first image. When I start the main-vi, the PPC.vi is on the case "Parsum measurement", in which measurement data are repeatedly called in a while loop (screw for call data provided by the manufacturer of the probe. Also, I am aware that I don't connect the data again. That will come later.). When I want to stop the measure, I have send the message "Exit" to the PPC.vi (last photo). However, the vi is stuck in the while loop in the case of the measure and is unresponsive. I tried to send a notifier with a constant value true, but that did not work as well.

    You have any suggestions, how can I stop the while loop before you send the message "Exit"? Or is the completely different way to approach this problem?

    Thank you!

    I just threw together a framework very fast to help you get started.  The thing I noticed is that the library of the queue doesn't have a time-out of the waiting message entry.  Since it is your own local copy (to the project), add a timeout and connect to the element Dequeue function.  I by default set to-1 and make it "recommended".

  • Judgment of multiple while loop running at different rates to stop using the single Boolean stop button

    Hello

    I'm on the block diagram of 4 loops, do different tasks. They are independent of each other, but need to see the unique front panel - some of the wonders of labview!

    Now, I want to have a unique stop button which will in fact be a back button to return to the main screen by stopping all four loops on the block diagram. I used the stop button (switch released) with local variable to stop the three other loops. He stops the vi but it is not a good stop vi to stop properly and the grid on the performance of the front panel. Now all loops run also at different rates, so it is not necessary that all loops are stopped immediately when one of the loop is stopped. Can't really think of a better way. All the ideas!

    Kind regards

    Austin

    Variables local is ok in this case, but you will need to keep the control in switching mode (no lock).

    A better solution would be to have all the loops as a structure of event all listening value stop change. Or have the Stop value change event generate a user defined output event or similar.

    /Y

  • HAVE multiple AO-synchronization-2 multiple while loops

    Hi all

    I want to characterize my RF circuit by using an additional narcotics control and map PXI-6229. I wrote a simple VI in Labview, which is almost similar to the example, multiple-HAVE-AO-synchronization, seen in LABVIEW. According to my VI, 4 analog outputs with different offsets dc, amplitudes and phase values must be generated to my RF circuit and 2 analog inputs must be acquired by this circuit simultaneously and continuously. But the problem with my VI is that I try to observe two diagrams at the same time to see the changes in signals generated and acquired. However, I don't see the two signals simultaneously. The second while loop, which belongs to the acquisition of analog signals, does not start while the first loop generates analog signals continuously. How can I synchronize these two while loops in order to observe the two parties in the diagrams?

    I have attached my VI.

    Thanks in advance.

    T. Eray

    Hi Eray,

    I will be brief and I'll keep it simple. If I understand correctly, you have trouble with the data stream in LabVIEW. When you work in LabVIEW, you must understand the order in which the blocks (functions/nodes/structers) are run in LabVIEW - stream. Each block can be executed just at the moment where there values on each entry. This means that if the 2 blocks are connected with a wire, the 2nd block waits until the first ends its execution.

    In your case, that means, this 2nd loop does not execute before the first loop (with the DAQ Assistant) ends its execution, because the son comes from the inside of the first loop, then they go to some DAQmx features and then DAQmx features they go to the 2nd loop.

    In principle, what you could do is to put the content of the first loop, where you prepare the signal generated in the 2nd loop. Good course without the DAQ Assistant. Instead, you can use DAQmx writing in the 2nd loop.

    Kind regards

    Martin

  • stop another WHILE loop

    I have two while loops running independently.

    The first has a Structure of the event that controls the STOP button for a user by clicking.

    The second series a bed to a port.

    When I get an error messages entering the serial port, I want to provoke the other WHILE loop stop.

    What is the best way to do it?

    Connect a case structure wire to the error and write to a signaling value property of the button stop in the case of error.

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

  • stop a while loop in slot - VI

    Hello

    I have a Subvi, which has a while loop and it is in my main vi in a sequence structure, I want to stop the loop inside the Subvi using a Boolean value in primary vi.

    I tried global variable, but it has not worked since the stop in my main vi botton is not updated when the program is running...

    could you please help me?

    I appreciate any ideas

    Thank you

    Darya

    As a general rule, avoid using Structures of the sequence.  The reason being that they are violating data streams.  If you can control the flow of data with threads, it is the most effective way to make your program work.  The idea to get rid of your sequence structures is therefore to make an another Subvi to your expectation that also has an error and output error.  Then, you can use the cluster of error to force execution.

    And while loops inside the subVIs is a common beginner problem.  If you do not order when the loop ends based on a front panel of the mainVI control, then the loop must be in the main VI.

    I hope it's a good summary of what was said.

  • a starting after another while loop

    I'm sorry, I'm new to labview, it's probably an easy question, but I didn't really even what to look for. I have two while loops next to each other, control of temperature (left) and the other pumps to control (right). I don't want to start the pumps until the temperature rises to the right value. The<= operator="" in="" the="" while="" loop="" on="" the="" left="" is="" what="" controls="" the="" heater="" in="" my="" system.="" i="" want="" the="" while="" loop="" on="" the="" right="" to="" start="" after="" the=""><= operator="" returns="" false="" for="" the="" very="" first="" time,="" but="" after="" that="" i="" want="" them="" to="" operate="" independently="" of="" each="" other,="" with="" both="" while="" loops="" running="" until="" they="" are="">


  • Stop a while loop with outdoor table

    Hello

    I have a problem to stop the execution of a vi that uses a while loop and outside a table with two values of time intervals. I would like to stop the VI when the different values of the array are passed. I have attached here the code if you want to help me please, thank you in advance.


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

  • Synchronization of multiple While loops

    Hi all

    I work with 4 all in curls that are independent from each other that is, there is no data flow in one loop at the other.

    I noticed that every while loop takes different time to iterate.

    However, I want to while loops to begin and end at the same time after each iteration.

    How can I synchronize their?

    Thank you for your response.

    Concerning

    Aveo

    Hi Aveo,

    You can use a few 'occurrences', 'Notifier', or "Rendesvouz" to synchronize your loops.

    Or use timed while loops - they can work in harmony...

  • Sharing data between multiple while loops, competitor rates

    Hello

    I am trying to Exchange data between competitor while loops running at different speeds.  What is the recommended way to do this?    In practice, I have 12 indicators and 3 cards I would update (on screen) in the slower loop, although the data acquired and stored on disk in the fastest loop.  The image below is a simplified version of what really works my candidacy.

    I currently use local variables and shared to achieve this.  I heard however that local variables are evil because of their use of memory (data are copied instead of who passed by reference).

    Thanks for your suggestions,

    Adam

    Hi Adam,.

    Yes, here you go.

    Mike

  • Delay loop before stopping the while loop

    Hi all

    I modified this code to the example in the forum. I forgot what thread. The file name is "control.vi of loop speed.

    I want to measure pressure and compare with the pressure of the target. Once the pressure reading is higher than the pressure of the target, I want the output high for 5 seconds and turn it down.

    When he goes back to the bass, I want the to exit the loop, or when I pressed the stop button. I don't know how to do it. Help, please.

    Thank you

    I can't view your VI (I use LV 2014). Please see my attachment for an example. See what happens when you make the numerical value > = 1. Enable execution of mark if she makes no sense.

Maybe you are looking for

  • Impossible to update credit card information

    When I access my account, I can't update the news.  Bought a new Apple TV.  I wanted to buy an app.  The screen asked my security code credit card (number 3).  I entered it and told me that it was not valid.  I went to my account and saw that the blo

  • can I back up all my documents, pictures

    Hi, I'm gradually moving to Apple, but uses a desktop PC as my main device, I will in time buy an iMac but already use an iPhone, iPad & MacBook. I have the storage free iCloud (5 GB). I have about 600 GB of documents, photos & music that is stored o

  • How to register 3 SmartWatch on the Sony site?

    How to register 3 SmartWatch on the Sony site?I am not finding an ID number to enter on the website nor I can get the number directly from a keyboard on the SmartWatch.

  • How can I catch the focus event context menu?

    I would like to indicate when the development of a context menu is placed in the order of the day, to make the feature: from the first to the last menu item when the focus moves in the direction upwards and from the last to the first element in the d

  • Automatic text using a style object, variable, or script?

    Ce_que I would do, is to have an object style that will assign to a frame 1) dressing, 2) vertical center and 3) put the Page Blank words unless I have to type them in each time. I already have the object style set for the scarf, the alignment and th