A loop a flat structure

OK, so that's what doing,.

on my front, I have a few pipes and IM trying to simulate flow threw, so I used small pipes online since the dsc module, put them in a flat structure with delays on them. And started the flat structure with a switch that released once pressed, then I hit the switch get a real value all my pipes light up in sequence and the switch has not locked if I get a false and al pipes deilluminate in the order, and all is well in my world.

until I have try to repeat it with them hitting the switch. Trying to pipes go on, turns off pipes and with out giving a real switch

Ahhh.

Ive ran out of things to try. All ideas,

dose, none of this making any scene, IM probably far track and better take the lap top in the trash and going to the pub!

Thanks for reading

his emotional summer

You could use a loop and toggle a Boolean value into a knot of registry or feedback shift with each iteration using "reverse".

Maybe If you used your VI we could give the best advice. Your description is a bit confusing.

(Which is a 'flat structure'? Several structures are flat (time/FOR loops, etc.). Do you mean "flat sequence? How do you want to 'start' a structure?)

Tags: NI Software

Similar Questions

  • 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

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

  • In Muse, how do you define settings to publish the HTML files to a 'flat structure' as opposed to directories? With my software previous "Net objects Fusion" he settings under "Publish" to do this.

    In Muse, how do you define settings to publish the HTML files to a 'flat structure' as opposed to directories? With my software previous "Net objects Fusion" he settings under "Publish" to do this.

    You can not. It's just how Muse works and makes the distinction between global and local by the elements of the page.

    Mylenium

  • How to run a framework for a flat structure of sequence for a period of time?

    Hello

    I have a loop timed measuring a resistance value every 2 seconds. I wish I had this loop timed to run for a period of time (5 minutes). The timed loop itself is placed within a flat sequence so I fear that the measure will be taken once and the next picture will begin to run, without wait 2 seconds for a successive reading (and not a loop for, say, 5 minutes).

    In other words, is it possible to have a flat sequence structure frame run for awhile before moving on to the next image?

    Thanks for your help!

    JFK_Aero

    All code within a sequence must complete before can execute the following image.  So until your timed loop is configured correctly, the following image may not run until your 5 minutes is up (N = 5 minutes / 2 s/measure = 150 steps).

  • How to turn on the flat Structure of sequence based on a Boolean value?

    Hello

    I try to write a (attached) VI who enjoy an analog voltage that crosses one analog multiplexer. I am using a flat sequence structure to change the output of select signals to change the channel to be sampled. I wonder if I can turn on the structure when my Boolean input of the sample is TRUE?

    Based on the image (I can't watch the VI himself), he doesn't seem to be a necessity for the sequence at all. There is data connections Wizard DAQ to two scalar indicators, which implies that you are taking a single sample. No need to acquire multiple samples and throw all but one. The second sequence is certainly unnecessary.

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


  • Cannot auto index from a for loop through a structure of business output

    I have a loop nested in a case structure, and outside the case, the structure is written to measure Vi. at each iteration of the loop for, I am trying to send data to writing custom Vi by using a tunnel with automatic indexing enabled. But writing custom Vi saw the release of the latest iteration of the loop. Is happening because I try automatic indexing on thanks to a structure of matter? How do you set up business structures to automatic alow to indexing?

    The loop passed out all the data in the form of a table (a row/iteration) 2D and add it to the file. However, your scalar indicator 'Output average SM' will not show the value of the last inner iteration. If you want to see all sequence values, move the indicator in the innermost loop.

    Also erase you the previous errors in each iteration, so you won't see any errors.

    As a general rule, you have far too much code duplication. For example, your inner loops share a huge amount of code. Everything that needs to be in the structure of case is code that is different. Here's how you could simplify it. (it of just a project and probably has errors).

    There are also 'model boom' that you can use to simplify things a lot more.

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

  • problems with timing in a time loop in a structure of the event

    Hello

    I'm using labview to control three motors stepper, running the three stages of different translation in different axes (X, Y and Z). Please see the attached VI, focusing on the structure of the event on the RIGHT side.

    In the Z axis, I am trying to run the engine for 5 seconds, after clicking on a button. I have attampted to do by adding a sub of elapsed time VI within a while loop, located in the tab 'Mouse before Z down' the structure of the event. A similar "elapsed time while loop" is also included in tab 'Z reverse the mouse down' the structure of the event.

    Separately these "elapsed time loops" work very well, BUT when I run a Z direction after another, say 'Z Reverse' and then 'Before Z' then they annoyingly interact. The calendar is gone, with the moment where we add, rather than rebooting.

    No idea how I can reset the time elapsed while loops? Or is there another method better do?

    Thank you very much

    Charlie

    charlieryan wrote:

    I take a wire from the 'i' of the while loop at the entrance of the Sub autoreset - VI of tiem will blink?

    No, connect you to the "reset", not "autoreset".

  • 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

  • multiple messages from several loops in the structure of the event

    Hey guys,.

    I have two questions, first of all, what is the best way to receive messages in case of structure? I've been watching the user events, and which seems to be a good option if I want to never send a single message. Ive never found an example where the regester for events has a second event its looking. I currently use queues to the structure of the event to my other loops.

    My second question is I want to even send messages to the structure of the event, my current thinking is that it would make things easier to follow if the structure of the event sent all messages to the individual lines. Is it more appropriate to have just a loop of talk directly to one another through the queues already in place?

    IM thinking ill put in place a user for handlng errors event but I'm not sure on other messages.

    Thank you guys

    You can get events for individual events. Better yet, you can use clusters to group the different events and access them individually (see below).

  • While loops and event structures

    Is there a problem using more then one While loop with an internal structure of the event, in a single VI?

    In my (only a partially attached printscreen) VI there is more then 2 all in curls with a structure internal even who controls a different devices.

    Event structures are being controlled by a box structure.

    From time to time the VI gets stuck and resetting local variables.

    Hello

    Using two while the loop is not a problem, it depends on how you structure the code.

    Generally, we use two while loop for Producure-consumer, master - slave structure type of applications. Try to use the structure of State machine inside while loops, see standard state machine examples in the palette of NOR find example.

  • Loops Parallels and Structure of the event

    Hello

    Is attached a valid way to the use of the structure of the event?  I keep hearing that the case of the event should include control of the event.  Can the control be placed elsewhere?  For example, if I have 2 loops, I placed a structure of the event in the 1st loop and control associated with the event in the 2nd loop, is there a potential problem?  It is true that no matter where a Boolean with a value change is read, the Ministry of value in the event structure will be fired?  See attachment.

    This screenshot you posted should work for you fine.

    The main reason that you hear the case of the event should contain the control for the event is so that the control is read and for locking of Boolean values, gets reset when the case of events runs.

    Here since the first parallel loop runs (assuming nothing else in the loop causes the loop to get blocked), the stop button will read and reset.  The value change event will always be raised in the upper structure of event loop.

  • Several loops in the structure of the event

    Hello

    I am writing a program that uses data from an aerial camera to control a robot differentially articulated around a track. I'm new to LabVIEW and I have a question to get the structure of the event and while loops to work as I want. My code currently has three while loops, running in parallel, to treat the image in the necessary data, one to use the data to locate the robot and the last to issue commands to the robot. I'm trying to add in a Subvi calibration that will recalibrate the camera early upward, and whenever the user clicks on the calibration button. Basically, I want to stop/pause the three while the curls then run the Subvi, then start the loops up using up-to-date data of the Subvi.

    I thought that a structure of the event would be the best way to do this, but I can't seem to make it work properly. I have provided a fake version of the main VI. If someone could point me in the right direction on how to do it and also if anyone knows a good place for the tutorials for this sort of thing that would be great.

    Thanks in advance

    ~ Nick

    Thanks BowenM,

    I'll look in producer/consumer architecture and see if I can make it work.

    ~ Nick

Maybe you are looking for