structure of stacked sequence

OK, so what I try to do is to use LabVIEW 8.0 and a USB-6008 is a photocell allows to start the rotation of a motor continuous when it is in the darkness and stop the motor function once it is exposed to light.  Only after the engine stopped moving I want then to a linear actuator to deploy.  Separately all programs work as it should and I was able to integrate successfully the photocell function and motor.  What I can't do, is get the actuator to deploy once the engine has brought his designated position.

I was planning on using a structure of stacked sequence so that I make sure the actuator goes off until the engine has completed its task.  Because I need to have the photoresistor and the engine in a while loop to ensure that they are constantly looking for the data telling them what to do, I placed them in the while loop and the motor part of the code in a frame of the stacked sequence.  Once the motor stops, I then passes the data forward to the next section, which is just a Boolean wire coming out then the structure of the sequence in a loop to give the necessary tension to control the actuator.  However, it does not, the engine continues to ork in synchronization with the resistance, but the trigger does not fire.  I wonder if there is something wrong with my attempt to pass off while the structure data.  As I read on stacked sequences, it seems that many people do not use them because they do not work properly in time so I wonder if there is a way to avoid using one but to make sure that the actuator will not draw unless the resistance has guided the motor in position.

I have attached the code to help the understanding of the program.

I use a bridge allowing movement front and rear H, you will see a 3 x 1 matrix in the structure of the case.

Thank you!

Hi Leanne,

You could use a digital logic to check for a change in value, and the value itself.  In the example below, I did this with a feedback node that stores the value of the digital line of the previous loop iteration:

Tags: NI Hardware

Similar Questions

  • The output of a stacked sequence index

    Hello world

    I write code in which I instantiate objects much when I first start my code and place objects in a table that is subsequently used as a lookup table in the operation.  It takes a lot of space on the block diagram and it is difficult to understand for the user who is not familiar with the code.  Is it possible to create something like a sequence of plate which may have a single indexed exit tunnel?  I want something like what you get when having a tunnel on a loop for, I want just every single itteration (unlike the loop for).  I have included a picture of what my schema currently looks like for reference.  You can see that I have create all the objects with unique information (ID, order number, etc.) and then create a table with them.  I would like for each of these objects in an image of a sequence that is stacked with a single indexed output instantiate (if possible).

    Thanks for the tips!

    -Eric

    Option 1: use a Subvi

    Option 2: Use a loop FOR as a sequencer.  Instead of the structure of stacked sequence (or flat), put a case inside a loop structure FOR and wire the i for the selector of the case.  Then, in each case, you can initialize a different class.  The output can then be autoindexed.

  • Order the dish/stacked sequence excecutes

    Normally, a flat structure to sequence in a loop for if Execute from left to the right until it reaches the end and then repeat the left right code as many times as the loop he tells too much.

    I want to be able to change the order / discreet in which the sequence loop around, so that my excecutes stacked in the 'Z' patter above sequence.  He needs to realize from left to right until it gets to the end, then bounce back (without repeating the last image) and run from right to left, until it hits the start frame, bounce again (without repeating the start frame), and executed from left to right to what he hits the last image, bounce back again once , etc etc etc, many times I have to say.

    Tips on how to achieve this?

    Forget the flat/stacked sequence diagram. They are only as a LAST resort.

    If all your actions was I sup vi then call one by one in a while loop. You can use a cluster of error to force the flow of data between the sub of vi.

    If not go get some Statemashine. There are a lot of entries on this site for State mashines in LabVIEW.

  • Timed Structure of the sequence timing error

    I'm trying to create two RF waves to pulse, at 90 degrees and the other 180 degrees with a second 2 delay after the first impulse. I used this time sequence structure and think that I followed the requrements, but no matter what I change the second pulse occurs immediately after the first. Please let me know what I am doing wrong or if there is another approach to do this. Thank you.

    Two things.  The delay on the structure of the sequence function is looking for a value in milliseconds, making connections in seconds.  If multiple by a 1000.

    Second, you're dividing your frequency of sampling frequency and fueling the sinusoidal signal generator.  Just wire the frequency.

  • Repeat items in a stacked sequence

    Hi does anyone know how to repeat elements of a stacked sequence?  For example, if I want to repeat that frames 7-12, how would I go all this?  I was watching the State machines, but also to try to understand.  I thought that there could be an easier way to do somehow with a while loop, but not sure how I would go all this.  Thank you!

    Jon

    You need to understand the state machine. It serves to do just what you want to do.

  • question about stacked sequence

    Hello

    I have a question about stacked sequence.

    I have a stacked with 5 sequences sequence (0,..., 4). I would like to run these as this form

    0, 1, 2, 1, 3, 1, 4, 1 then again 0...

    I don't want to duplicate the section 1 because it contains many objects, variable... One possibility would be to out objects and then duplicate the sequence and use of shift registers, but I don't want to use because in 1, I have some graphs in real time to draw...

    Will there be another (easy) way to do this?

    Thanks for the ideas,

    Concerning

    Why use a stacked sequence?  What you want is a state machine something like this

  • Running a Subvi independently in a stacked sequence

    Of expensive Labviewer. We have an instrument that is controlled by a labview program. The program consists of a bunch of operations in sequence and each operation is implemented using sequences la_ROSE923/flat. At some point in the sequence, I want to ramp a furnace (owen) external to a given temperature, for a period of 5 to 10 minutes to do this, I did a Subvi who works for this purpose (using a while loop set). If I put the Subvi in the structure (sequence stacked/flat) all of the process holds it until my Subvi is finished, but I want the overall process to move to the next sequence just after starting Subvi. How do I implement that?

    Any help is highly appreciated

    Warmly optimistic

    Morgan

    You can use any loop in parallel.

  • structure of flat sequence for benchmarking

    Hello

    Maybe this is very obvious, but I don't completely understand something with the sequence flat structures-FSS (I never use this structure by the way and I don't you not why they use it in this example).

    There's a doc OR online explaining some mistakes of rookie in LV:

    http://www.NI.com/newsletter/51735/en/

    The doc has described that the FSS is useful for benchmarking, the BD:

    My question: what if we put the number of cycles in a Subvi left and right and giving the exec. order with wires of the error? Or using a while loop that runs only once (with sons of error through)?

    These 3 different ways are the same?

    Yes, you can do all these things - I think that the only thing to keep in mind is that you do not want your benchmarking code to affect the speed of the code - otherwise, you'll get inaccurate results. If you use the while loop, you will need to do something to make sure your second number of cycles will run after your time loop - for example with FSS

    Flat sequence structure using is OK - it's overuse of it which is a common rookie mistake - trying to force things to run in a specific order (for example if from a text based on the sequential programming language) instead of understanding that this is done by data flow in LabVIEW.

    I think that the reason is simply because the number of cycles VI doesn't have an entry so you cannot apply data flow. It is common to have a Subvi, which encapsulates the number of cycles VI with error/output wire.

  • structure frame unique sequence

    The following code came from the CLD to review model system security.  I do not understand why a single sequence frame has been used in this case?  Anyone can unmask?

    Thanks in advance.

    Although I do not know (even though I work at NEITHER), the code looks like the sort of query code that was common before the structure of the event showed.  Correct use of the structure of the event which would eliminate the need for the people of the country and this review.

  • using the same indicator of string in different stacked sequences

    Hi guys, I want to use the same string in different sequences stacked indicator. I tried to plug the output of each string constant through the sequence on my indicator chain outside the block in the sequence, but then I get an error "wire connected to a tunnel not channeled. What is the best way to use the same indicator for all sequences?

    Hi JoVMo,

    You can just use a local Variable of this indicator within the sequence...

    Kind regards

    Nitz...

    (Kudos are always welcome)

  • Button "Exit", used in several images of the sequence

    I hope that there is a more elegant way to do...

    See the VI attached for a much simplified program that is typical of what I am trying to accomplish.  Basically I have a button that I want available in several images in the sequence.  In this case, I used a button "quit".  When you press on, the program passes by remaining sequence frames until it ends.  The last image "unclicks" the button "Exit".  This last image is necessary because I had to put the mechanical action of the Exit button for "switch when released" because I used local variables in all the images in the sequence after the first.

    Is there a way I can accomplish the same functionality of this program without using local variables and/or during the definition of the mechanical action of the 'exit' switch to ' lock releasing?  Specifically, I'm looking for solutions that will work in several images of a structure of stacked sequence (I realized there are ways for the three lights without using a structure of stacked sequence, but I'm not interested in doing).

    Any help would be greatly appreciated!  Thank you!

    Something where you're looking at a sequence of steps, you really recommended using a state machine architecture.  (Search the forums for examples).

    Having several structures event with cases duplicated in different settings of a structure of stacked sequence (it would be a little better if you used a structure rather flat sequence), only to request trouble on the road.

  • Change the structure of program based on the input file

    I have a program that takes parameters of an input file and then executes a Visual acquisition, using IMAQ, controlling some other hardware at the same time.  The duration of the various stages of this process control settings.

    There is a sequence stacked structure to control the playback of the input file, the initialization of the hardware, and then a while loop on the last image to actual purchase.

    The user of the program now wish to have several games acquisition in the same race, possibly with different time settings.  This would mean different iterations of the final loop, based on the parameters of the input file.  There could be 5 games of acquisition on occasion, 3 on another, etc., in a performance of the program.

    The structure VI already seems a little baroque, and I don't want to make it even more complicated.

    I would appreciate advice on how best to proceed, because I'm really a novice of LabView.

    If you use a "State Machine" architecture, you can do exactly that.

    Instead of having a structure of stacked sequence, it is essentially a case structure in a while loop.

    Each case represents a State.

    So in your case, you would have a State for:

    -reading the input file

    -initialization of hardware

    -data acquisition

    You can have the user controls the number of iterations of the State for the acquisition of data that you want to run.

  • Why structures function palette is not complete?

    LabVIEW 2014 doesn't have full function of VI on the paltte, for example stacked sequence does not appear in the box structures. This seems to be an old question on other labview versions bacause have installed several versions of labview on the same PC.

    However, this structure (stacked sequence) appears under structures Mindstorm! but not on the choice of "programming".

    Is this a bug?

    Hi Lalox,

    This is a feature of the latest version of LabVIEW (right now) and has been requested by many (more experienced) exchanging ideas LabVIEW LabVIEW programmers!

    The flat sequence Structure help says:

    To create a structure of stacked sequence, place a flat structure sequence on the block diagram, with the right flat sequence structure button, then choose Replace with stacked sequence.

  • Stop the multiple loop without delay to the cRIO

    Hi all

    the VI in cRIO has a large loop, it contains 4 small while in parallel to the work loop. In every little while, they have a stacked with a lot of frame sequence.
    I want to stop everything with only one STOP button on my host live. But when I press STOP, I have to wait for all the small loops completed their charge and finally the big one can stop. Is there any solution to immediately end all?

    Thank you very much

    d4nvjpl0ng4n wrote:

    the VI in cRIO has a large loop, it contains 4 small while in parallel to the work loop. In every little while, they have a stacked with a lot of frame sequence.
    I want to stop everything with only one STOP button on my host live. But when I press STOP, I have to wait for all the small loops completed their charge and finally the big one can stop. Is there any solution to immediately end all?

    1. you should not have the large loop.  Which is just to add unnecessary complexity.

    2. you hit the major problem with the Structures of stacked sequence: everything must go before it is complete.  The solution is to use a State Machine.

  • How to create a botton pause to pause a program

    I would like to create a pause button to interrupt the process.

    Then a race that button pressed will continue from where it stopped in..

    My program is attached. .

    I would really like your help. .

    Thank you. .

    Oh and the while loop outside the structure of stacked sequence is so that my program will run when you press the Start button, on the front panel. .

    A simple solution would be to put the code in your loop in the false case of a box structure.  Wire a Boolean 'Pause' to the case picker control and set its text on 'summary '.  Put a little more time in the case of True to prevent it from hogging the CPU during a break and Bob is your uncle.

    Edit - Make sure to set the mechanical action of the Boolean value of Pause to switch when Pressed/released.

Maybe you are looking for