Run two loops alternating

Hello

I want to run a loop in 1 second, and then a second loop for 1 second and that is repeated before pressing the stop button. If you can give me some examples, it will be better.

Something like that?

It's the best I can do without additional information.

Tags: NI Software

Similar Questions

  • Best practice for simultaneously run two loops (read + write) in sync

    Hello

    I thought I had a work program that could write and read simultaeously with reasonable accuracy, because it is perhaps not as reliable that I discovered the thought (he sometimes gets out of sync/jumps steps).

    Is there a good guide, method tutorial or recommended to do with reliability, in sync and effectively?

    Should I use the notifier? and/or timed loops?

    I have a loop of Scripture, which sends steps to a certain type of equipment (stepper motor or magnet etc.) to not more than 100 Hz.

    I have a loop of reading, that reads data from a detector (photodiode, the signal is dependent on the stage of writing), no more than about 1000 Hz (the playback loop runs faster than the loop of writing)

    I then pass information from one loop to the other (a single loop wrote to a group, the other readings of him).

    I then save data to a file by saving the content of the chart.

    Thank you

    Jeff_Tech wrote:

    (1)... in sync...

    (2) ... (the playback loop runs faster than the loop of writing...)

    These two statements are not a contradiction?

    There is important information that you have left behind, for example are - it enough for both in phase or is it also necessary that they occur at a very steady pace.

    What the two depend on each other? It is an application of control where the output depends on the entry in some way or is it simply an excitation/response pair.

    Are you single point of software timed acquisition?

    Should it operate for long periods of time or he just a scan done every time?

    In any case, are probably the right thing is to run the two hardware timed the same clock. Configure the AO output array and arm the AI, then start the two running of the same clock (for example, you might bind the conversion of CEW AO clock). Read the data in the buffer to HAVE at your leisure in a loop which is a not any special time.

    Can you show us a code so we get a better sense of what you are doing?

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

  • 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

  • Running two cmd prompt in parallel

    It's been a while since I've posted

    How do you run two guests of cmd in parallel?

    Kind regards

    -SS

    Please note using LV 8.6.

    Running in execution of highlight mode does not reveal whether or not they are running simultaneously.  Is this the only way that you "know" that they do not run concurrent?  If so, I would look for another way to confirm.  Maybe writing in two separate text files and recording a timestamp.  How long the procedure is that you want to run with the command prompt?

    If you only need to run each command once, the loops are not necessary.  LabVIEW, by design, takes advantage of the multithreaded processors as long as there is no dependency between the two commands.

  • 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

  • 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

  • What is the best way to run two concurrent programs using the output of either executing the other?

    I wanted to just kind of get a notice of some people here. I have two main screws the first is a data acquisition system that displays 99 different sensors and which feeds on these data in a table. The second is a real-time processing system that is designed to take the painting and do many calculations. The two output data from screw at the front that I want to see, so I don't want to use just as a Subvi.

    Is there a simple way to run two screws, using the output of the data acquisition system to power the processor so that you can easily see the signs before two screws? I had thought to simply copy the code from the processor in real-time in the DAQ VI, but I fear that the VI resulting will be very large and unsightly.

    On a side note, I'm more thinking about this? I apologize if this is a stupid question, it has been a long week... aaaand it's Wednesday.

    Look at the Architecture of producer/consumer.  It will be a good starting point, even if you find that you need to change.  When performing data acquisition and processing of tasks in parallel loops, they can both run simultaneously.  Both can feed data to the main draw of the VI.

    I'd probably use three loops with the third being the user interface only.  All that must be displayed to the user is sent to the GUI of the acquisition of data or processing loop loops and commands or entered by users are returned in these loops, probably through queues.  The wall of the VI of data acquisition and processing VI are never displayed to the user.  Especially the treatment, because it runs on a system in real-time, should avoid synchronization issues that can present a graphical interface.

    Lynn

  • 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

  • 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

  • Running two engines step by step at the same time of a port

    Hello

    I have to run two motors at the same time - was used to move a linear ball screw and the other to get a grip. I do voltage and test on small twist wires, but the tension and torsion must be made at the same time. I must also build capacity for each engine to take several steps, IE. have an engine steps number at speed x and then move x number of speed z steps. The two engines must be able to do. However, I have problems to make the engines to run at the same time and to take all measures. The engines are connected to two RMS Technologies R356 controllers. The two controllers are then connected to a RS485 to USB converter card and this card is connected to one of the USB ports on the computer. Currently, I spend an array of orders to two loops each VISA containing read and written. I have attached the vi to watch. All the stuff in the code synchronization is because a new order cannot be sent to the controller until the engine is running the previous command. If orders are sent right after the other, the controller will not execute the first command and then return with an error.

    Does anyone have a suggestion as to what I'm doing wrong?

    Thanks in advance for any help.


  • Can I control the activity of the two loops independently while in the same vi?

    I would like to run two generators of random numbers (RNG) in the same vi. The first GNA go all the time that the vi is running. But I would like to be able to control the second RNG (turn on and off at will). I consider start and stop buttons wired for the while loop to control the GNA. I tried a few different configurations but none work so far. I have included a simple vi with the start and stop buttons. I don't know how to reach my goal with them. Thanks for your help.

    Like this:

    You forgot to attach your vi.  You don't need two while loops.

  • I've just updated TB I was running two clients installation 1 now have server problems

    I run two clients TB since an installation - never had any problems. I've just updated to 24.4.0 and one of these installed works fine, the other will not receive or send e-mails. I get the following error.

    The message send failed.
    The message cannot be sent because the connection to the SMTP server mail.just - 2bme.com failed. The server is may be unavailable or refuses the SMTP connections. Please check that your SMTP server settings are correct and try again or contact the server administrator.

    Any SMTP server I use - I have 4 that (usually) work, no matter which I use I have the same problem. I can use the same SMTP server to send the other as the other install - install works, this one isn't. VERY STRANGE.

    connectivity immediately after an update issues are generally anti too cautious anti-virus programs and blocking everything in this new unknown.

  • can you run two sessions of firefox, in privacy and confidentiality not in a mode

    You can run two Firefox sessions, one in privacy and confidentiality not in a mode.
    Basically, in chrome, I can connect facebook with 2 different account, I opened got chrome FB and login (account1), then I click on ctrl-shift-n and go on FB and login (Account2)
    Here, the question is, is it possible with firefox?

    Use-no.-line switch remote control to open another instance of Firefox with its own profile and to different instances of Firefox running concurrently.

  • How can I run two different versions of Firefox, the last does not work with a site important I need to use?

    With the latest version of Firefox, I can't ' fast email ' to my students through the ANGEL of the College System. I had to uninstall and go to an earlier version. I prefer the new rev.

    A way to run two different versions. It doesn't have to be simultaneously. Seems to be a problem on the Mac and my XP systems.

    Thank you
    Kim

    You can install the portable version of Firefox 3.6.x to access Web sites that don't work with Firefox 5 +.

Maybe you are looking for

  • 2540 HP all-in-one printer print by wifi only works after the router reset every time

    Hi, I recently bought a HP2540 all-in-one printer. I was unable to get the printer to work via wifi after trying lots of different things, but after rebooting the router and try again, it worked perfectly. However, it seems that whenever I'm away fro

  • Hangul toggle English

    Hi everyone, please help me with this problem: I want to turn on/off the key HANGUL/English program in Windows XP and VB.net environment code. Thank you.

  • My Device Manager page is empty

    Don't forget: this is a public forum so never post such private information by e-mail or phone, no Ubers! Ideas: I am running XP Professional 2002. Device Manager box is empty when it is open. How can I register my hardware devices please? You have p

  • Regfiles

    I would like to find the solution that makes a regfile opened in Notepad, when you double-click it.  Then you right-click to merge if you wish.  I thought it was the site of Kelley, but for the life of me I can't locate. Using Windows XP SP3.

  • computer laptop 10 h 00

    When I go to my company's site. so try different curiosities here it happens that the type of browser and the version is MSIE 1 and I need SHCM to proceed.  It doesn, t except my browser windows 8 10.0, but my office works very well it?