Control of two loops simultaneously running

Hello

My measure requires running two instances, each runs in its own loop integrated in an event structure (used to trigger action).

In my particular case, I trigger a process in the while_loop1, this should trigger loop2 (initiates my detector and keeps it open up to loop1 is ready).

The simplified problem is illustrated in the picture as an attachment. I have can´t trigger loop2 Interior loop1, although the 2 switch is enabled using the local variable. I basically do not receive the message recu2 if it is triggered in loop1. No idea how to do this?

Many thanks in advance,

Steffen

A local variable entry fires an event. This has been discussed many times. Write the Value property (signs). Use a unique event with several events structure and add an event to the stop button.

Tags: NI Software

Similar Questions

  • Added a counter which keeps the total number of times where a loop has run, even if LabVIEW has been restarted.

    Hi all

    I am writing a VI to measure the data and insert into a database. The measures are controlled by a loop that runs once per minute. I want to give a unique to each measure identification number and store it too much in the database.

    To do this, I want to add a counter to this loop so that I can count the number of times that the loop is executed in total. It is, even if the VI, LabVIEW or even e PC is restarted, I want the counter to track the number of executions. If say the Edeka runs twice and then the VI is stopped and restarted, I want the number following on the counter to be three.

    Does anyone have an idea on how to do it? I'm gratefule for any help!

    Clara

    A suggestion. Can you write the last counter value in a txt file and read it all by running again the vi?

  • Data dependence isn't the only thing to stop while loops to run simultaneously?

    I write code to turn two stepper motors with various functions. This is my first program, so I don't know it's terrible, but I'm very interested in getting this work. I checked for the data depenecy and followed some suggestions to use local variables to solve the problem. It did not work, so now I'm trying to understand this.

    I know that all features were able to simultaneously run, but after a few changes (including put everything in a while loop to keep the program running until someone clicks the exit button), no function can currently work simultaneously.

    I'll post my code in case someone has the time to watch it (I'd really appreciate it if someone did), but I am also looking for any other problem that might be the source of the problem.

    Really, any help is greatly appreciated.

    Thanks in advance


  • control of time of two loops

    Hi all

    Here, I'm a little stuck. I'm trying to control the execution of the two loops to display a picture, I need run the upper loop for example for 30 seconds, after that he needs to stop and the lower loop starts to run for 15 seconds and stop. and then the upper loop run again for 30 seconds and then the process continue in this way.

    So please, if you can share me your trick, which will be appreciated.

    Thank you

    Hello

    something like this should work.

    Best regards

    K

  • two loop running concurrently, but double length

    Hi guys,.

    I try to read at the same time both ion Chamber. IC0 IC1 reading and reading have a loop of each.

    These two Subvi can run concurrently, but by the time the cost doubled again.

    Why?

    Thank you very much!

    Hi guys,.

    Thanks for your reply.

    I found the problem. I put the delay between write and read the com see the following figure. The timer was implemented with Resp.vi of IC101. After I moved out, my code can work well. It's the job

  • Before the controls Panel reset each VI run.

    Hello

    I have a test unit, MISTLETOE is designed in Labview; Measures pressure and writing for a Word report are required. I currently have a problem regarding the behavior of VI when I run. It is explained below:

    All my settings front and controls which give before you run the vi reset empty Windows when I run the VI.

    Also, I first thought that, ok, same if control values disappear, as long as they written in the report, it is very good. But, it happens that easily. When I have the controls on the front panel before you run the VI of power and then run the VI, I must stop the VI and run it again for them to print the report.

    The model is like this:

    1. go the front panel control values.

    2. to run the VI ===> Panel control values before disappearing.

    3. perform the test, stop the VI and print the ===> no control value to print.

    4 restart the VI without going all control values.

    5. run the VI ==> controls front are empty (of course, because no values have been entered).

    6. perform the test, stop the VI and print the report ===> initially entered control values to print.

    So, essentially, before control values not only disappear when the VI is executed, but there are also two that works for the values to enter in the memory and to print the report.

    The goal is to punch in the values of control-> Run the VI-> > print the report and the report is complete with all the values in that control.

    Now a bit about the VI:

    Control values, that I don't speak are simple string as the name of the company controls, operator name and al.

    The block diagram composed of (LEFT to RIGHT):

    Consumer & producer loops--> Type in front of panel controls--> print the report.

    In other words, loops of producer/consumer of output data in the toolkit of generation report. But the Front panel to be fed contols lie between producer/consumer loops and report printing function. (No express used screws)

    So, how can I get rid of my front panel endangered control values. I want to display when the VI is running.

    Please advice.

    Thanks in advance,

    RP.


  • Output graphics of two loops for

    I would like to see a graph of the output generated in both loops for.

    X: steps (i x I have two loops)

    Y: Y1 should graph the polar output

    Y2 should chart the Azimuthal output

    Probably very simple to resolve/upgrade in place.  (The output file works fine).

    Thank you

    Kevin

    Good work Kevin.

    I have some suggestions for you (I don't know what it will be eventually, because then maybe they're based):

    • If the data do not change over time, you can use a graphic instead of a graph; Whatever it is, reduce the necessary processing power by updating the two parcels only once for a full run of the outside loop (see below)
    • You have a lot of indicators that are not obviously necessary (they simply out what puts out control - off 4;) Stop 5; Polar; Azimuthal, etc.).  When you submit here, the code is more it is easy to understand and faster you get an answer (minimal document also helps understand us what all is for).
    • Use the decrement vi but don't take it off 1 (reduced the increase in code).
    • Avoid strain - explicitly cast I32 to double so that no appeal should be made to the Manager of memory running (will reduce your footprint of memory of codes).
    • Written file are intensive and bays of building CU generally allocate dynamically memory - try to avoid these as much as possible.  In your VI, you can write to the file once when all iterations are complete.  This will reduce the runtime of the VI.

    Anyway, there are a whole bunch of thoughts that you probably care to hear, but I hope they have been helpful.

    Cheers, Matt

  • Why these two loops while cannot work at the same time?

    I place two same while loop in the block diagram, and then use highligt and one-step run function to observe their parallel operation.

    But I discovered that this two loop operate alternately and cannot operate simultaneously.

    Can someone help me understand this?

    My software environment:

    OS: Windows XP SP3

    LabVIEW: student editions 2011

    CPU: intel P8400

    Hi, GerdW

    Thanks for the reply

    I post a video to illustrate my question.

    While I press a strong of the run, I find that these two loops does not begin at the same time.

    While the execution of a loop, the border on the other became dark.

    It seems that during an iteration in loop 1 run, the loop2 keep waiting. and then the loop2 iterate while loop1 keep waiting.

    I do not know why this happens

    Sincerely

  • Two different tests running on separate monitors

    Can I run two executables different labview from a PC on separate monitors

    at the same time? I have a test installation of 2 station I would use 1 PC and 2 monitors with touchscreen for the RACC 2 operators simultaneously run different tests on each station.

    As long as you are careful not to use the same resources (files, hardware, etc.), you can have as executables running as you want.

  • Two loops of event Structure: hang

    Hello

    I have a wired problem when I try to use two loops with two event structures (see VI below).

    The problem is that you can stop the measurement and close the VI with X but not to stop it only with STOP button: this would lock the façade.

    Here my (rather long and perhaps not quite understandable) description of VI:

    A structure must respond on the user interface and the other a certain action. The first uses only user events: change value button START, PANEL NARROW? and the value enum STATE changes. The second event structure uses those registered dynamically: start the event user & user close event. Action when the STATE changes from button should always be done. When you press start the startup user event disables the START button and activates a loop in the second structure that should make continuous measurement. Now, we can always change the STATUS button and information (this works). The measurement loop should stop if the STOP button is true. Later START is enabled again and we should be able to press START again. It does not work as the front panel is locked. Curiously the last implemented user action works very well: by pressing X of VI, the PANEL CLOSE? is called in the first loop and should stop the two loops: If the measurement loop is running, STOP is True first, stop the loop measurement. Then a secondary structure event waits until the JUDGMENT is again set to False. If the measure is not in the process of running the first loop stops. In both cases, the event close user is sent to the second loop, successfully stop.

    I'm really confused, because I have no idea what is wrong. I would greatly appreciate any help on this.

    Best regards

    Daniel

    Thank you very much! This solves the problem. I did not understand that structures of events queued events even if they are not "active".

    (Finally there is even no need one notifier, you can just change the value of the real STOP button and will raise the event close user, comapare attached, work VI)

    Thanks again,

    Daniel

  • LabVIEW measures two loops (cycle of Charge and discharge) of writing to a file

    Hey,.

    I was wondering if it is possible to write measures Labview two loops (stacked sequence Structure) in a single file. Currently, he prepares the loading of data in a single file and discharge data in a single file. I have to every time the data for the chart of the charge and discharge cycles combine and sometimes there are about 50 cycles and by copying and pasting is time consuming.

    I'll try to upload my vi a little

    Hi basketball.

    I thought you loops run in parallel. In your case, you can simply use the same path for your files. Change the option to 'apend to the file. After these changes, the two loops must write to the same file.

    Mike

  • RTF model. body with two loops and custimized footer

    Hello.
    I have a rtf model with a body and a custom footer. The body has two loops. The first loop x cheques and the second for loop for x elements of each control.
    The footer must be individually for each control. Is there a possibility of variable access from the first loop of the body in the foot?

    the structure of my rtf file:_
    header: vacuum
    body:
    <? for-each: Scheck? >
    An asfdfadsfasdf: <? One? >



    Article price
    <?-foreach: point? > <? name? > <? price? >
    <? end foreach? >

    Summe: <? sum (price)? >

    <? model: footer? >
    <? One? > does not work*.
    <? end model? >


    <? split-of-page-break:? > <? end foreach? >



    footer:
    empty space
    empty space
    empty space
    empty space
    empty space
    empty space
    empty space
    empty space
    empty space
    <? Call: Footer? >






    an excerpt from my xml file:_
    < root >
    < Scheck >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < item > < name > Kunststoffe < / name > < price > 22000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 100000 < / price > < / item >
    < item > < name > Holz < / name > < price > 6000 < / price > < / item >
    < item > < name > paper < / name > < price > 100 < / price > < / item >
    < Payment > HUNDERTACHTUNDZWANZIGTAUSENDEINHUNDERT < / payment >
    < a > Firma1 < year >
    < / Scheck >
    < Scheck >
    < element > < name > end < / name > < price > 2000 < / price > < / item >
    < item > < name > Metalle < / name > < price > 10000 < / price > < / item >
    < item > < name > Holz < / name > < price > 600 < / price > < / item >
    < item > < name > paper < / name > < price > 10 < / price > < / item >
    < element > < name > end < / name > < price > 2000 < / price > < / item >


    Thank you for helping me!

    Edited by: user12052573 the 19.05.2010 02:00

    Hello

    change your main loop shape

    This will create a new page with a section break for each change in 'Scheck. You can remove your split sentence of page break.

    -Karine

  • I got two sources of camera the same audio recording - how to use multicam to audio synchronization and display TWO cameras simultaneously

    I had two sources of camera recording the same audio - I want to be able to do is use mulitcam SYNCHRONIZE the audio and video at the same time and be able to use the two clips simultaneously in a video - multicam - how can we use the TWO videos? In Multicam, I can only go to one video at a time - is to detach anyway, so I can trim two camera responsition camera and 1 on a 16:9 screen? What would be the best way to do this? Any help would be welcome - Ty

    Two PPut copies the multicam in editing element, one on the other.

  • Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    Windows says FireFox must be updated but cannot be because the two instances are running, which is not true. It happens everytime I open FireFox

    This has happened

    Each time Firefox opened

    == June 28 2010

    Firefox 3.6.6 came out on 26/06/2010 to solve problems that some were plagued with the new crash protection feature introduced in Firefox 3.6.4. NOTE: Version 3.6.5 has been used for another product, so there is a "jump" in the version numbers.

    You need to update to the latest version, Firefox 3.6.6.

  • Time for a while loop to run once

    Hello guys,.

    I want to measure the time for a while loop to run once. There is a piece of code raised. So I just created a simple VI to try, please let me know which is the right way to do it?

    And I wondered, when I run the VI without highlighting the execution, he wouldn't give me a number, maybe it's because the code is simple and really fast? I have to highlight all the time?

    Thank you

    Not quite right.  Both get primitive value time will run at the same time.  use an image sequence to force the order of execution, as shown.  I also brought in the relitve of accuracy seconds vi of VI. LIB\utilities because it depends on the clock of the system rather than the mSec timer accuracy.

Maybe you are looking for

  • can not change country

    I've seen other messages that say you need apple support ring to change your country in the middle of a cycle of apple music subscription. It's crazy that you can't cancel your mid-cycle subscription. Surely a refund is possible? Or simply cancel? An

  • Do not turn off manually or plug-out because we are upgrading

    Each whenever I try to turn on my PC, screen says "do not turn off manually or plug-out because we are upgrading.

  • Internet Explore hangs and does not reach me all Web sites

    My computer works fine except that I can't access the internet.  When I try to access any Web site, he begins to do something and fast returns done but nothing is really happening.  I have a good wireless connection.   My wife's computer works fine i

  • Why I could not remove program icon after I uninstalled this program? and how?

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with the icon of the program of programs It is no longer in error messages... Check the location of the file and try ag

  • the number of elements in the groupdatamodel sections

    I have a listview that has attatched a groupedDataModel. The groupedDataModel has 3 sections, first elements of article 5 second of 6 elements third to 8 items How can I find the number of items in the sections groupdatamodel in QML? myList.dataModel