Flat sequence bug

Good morning.
I was working on a report generation vi for my project, and it has grown way too stacked. Loop within case, within sequence etc.
To keep a large VI tidy I was using the cleanup feature.
After another cleanup my 2 stacked sequences and 1 while loop became "bugged".
I tried to restart both labview and, later, the PC. Bug did not disappear.
Is there any way to fix the bug? I tried to replace structures with alternatives from right click menu. After few conversions the problem is not seen, but shortly appears.
Any way maybe with HEX editor?
Flat sequence thinks it has a stacked sequence wall on the right side. Mouse can't be seen on screenshots though.
Attachments:
PIC2.jpg ‏139 KB
PIC3.jpg ‏165 KB
PIC4.jpg ‏142 KB

I tried to move your structures around, but this happened:
Clearly this happens because of the massiveness of your VI. Luckily I was able to see the whole thing on my 1789 inch TV
A usefull tip: Don't create a blockdiagram that is bigger than your monitor, preferable not over todays 22 inch standards. Now-a-days I'm working on a rather big project and to be able to have the block diagram of my main VI within my screensize of 22 inches, I had to create more than 100 sub-VI's. But it's way easier to have a clear view over the whole program, than a 16k+ pixcel block diagram that can only be viewable on my 1789 inch .
I also believe many of the flat sequence structures can be removed. You should use the error wire for dataflow control and use sub-VI's if you got repeating code. Use logical icons for you're sub-VI's. Here is an example, which I prefer to use:
Red icons to easily see my Sub-VI's from standard LabVIEW icons, and also some text that I can refer to with comments so that other people understand what the sub-VI's do. This way my main VI does not have a block diagram larger than my monitor.
Regards,
Even
Certified LabVIEW Associate Developer
Automated Test Developer
Topro AS
Norway

Similar Messages

  • LV 8.0.1 chrash when I try to delete a flat sequence frame with contens.

    Dear LabVIEW users.
    I found another bug in LabVIEW 8.0.1.
    When I try to remove the first frame of a flat sequense that is filled with controls
    LV crashes. After dragging the code and controls out of the first frame (its empty
    now) I can delete this frame without a crash.
    With kind regards
    Martin Kunze
    KDI Digital Instrumentation.com
    e-mail: [email protected]
    Tel: +49 (0)441 9490852

    Hi Martin,
    I just tried removing the first frame from a Flat Sequence in 8.0, and I did not get a crash...the frame was full of control terminals.
    Perhaps you could give some more detailed instructions on how to reproduce the crash?  Better yet, perhaps you could attach a simple VI that demonstrates the problem?
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Execution time of a flat-sequence

    Hello there -
    Is there any way to get a measurement of how long each part of
    the flat sequence takes to execute?  Anything like matlab's "tic" and "toc"
    commands in labview?  I have been playing with it for a while now and
    have yet to discover if Labview has this functionality.  Anyone know of
    anything like this?
    I currently have a VI that controls the realtime acquisition of a CCD camera via Firewire and a USB spectrometer.  The VI collects data from each of these devices (triggered by an external source at 10Hz), and dumps them into a Matlab script which does analysis on the CCD image and spectrum.  The bulk of the VI sits inside a while loop, which continues to run until the user presses the stop button.  Inside this main loop is a flat-sequence.  The sequence goes:    ACQUIRE DATA --->  PROCESSING DATA ---->  MATLAB SCRIPT ----> PLOTTING GRAPHS -----> OUTPUT DATA TO FILE.   
    The problem here is that the VI runs at 5Hz, while we are triggering it at 10Hz.  Originally, it was my thought thought that the matlab algorithm was to blame, but I used the matlab commands "tic" and "toc" to determine that the matlab algorithm runs in 15-20ms.  I did this by putting a "tic" command at the top of the matlab algorithm and a "toc" command at the bottom.  The problem, as I have now discovered is that the rest of the labview code takes ~180ms to execute.  (This was discovered by putting the "tic" at the bottom of the program, and the "toc" at the top of the program, thereby measuring the execution time of everything except the matlab algorithm).  Each time a trigger signal from the external source comes in, it starts the flat-sequence structure (which takes ~190ms), and then waits for another trigger signal, always missing every second signal.  My eventual goal is to reduce the bloat, and get the algorithm down to less than 100ms, so that I can run the VI and acquire data at 10Hz rather than 5Hz.  If anyone can offer some help with this, it would be much appreciated!
    Eric
    P.S. - I have attached a copy of the VI that I am working on, but unfortunately, it most likely will not run on your computer....the VI will not run unless it is connected to a triggered spectrometer and CCD camera....but I have attached it anyways incase anyone who can help might want to take a look.
    Attachments:
    RTSpider.vi ‏376 KB

    can we divide the program into 2 parts and use background process for acquisition and front end process for analysis?
    I mean, create 2 VIs from the present VI and then launch the acquisition program dynamically as a background process and fire events in Main VI from acquisition VI and process it.  not sure how much it is going to reduce. lets give a try....
    Anil Punnam
    CLD
    LV 2012, TestStand 4.2..........

  • Metronomes​, while-loop​s and flat sequences

    I'm making a loop that is supposed to write a poll message to the serial port once every minute and read a message from the same port once every 256 ms. It is supposed to proceed untill a stop button is hit. It is based upon a while loop that contains two different flat sequence structures that each contains a metronome ("wait until next ms").
    The intention of thisis that the program goes through the loop and every 256 ms it reads the serial port and every 60 000 ms it sends a polling message. However, the indicators I've connected to the metronomes doesn't seem so show a linear increase in the ms timer. The poll timer occasionally increases a little (in two minutes it might increase 20 ms). The read timer does not increase at all. Poll count increases very irregularly.
    Does the flat sequences interfer with each other? Can this loop be changed in any manner in order to work properly?
    Attachments:
    poll_loop2.GIF ‏13 KB

    The loop is dominated by the "minute" timer, what will happen is that it will wait the minute, write, go to the 1/4 minute timer do it's read, the back to the minute timer. This is because LabVIEW is a data-flow language. There are a number of different ways to do this, one being having two loops, one writing, one reading, but with out some synchronization between the two they might drift. Another method would be to have an event structure, with the timeout value set to 250 mS, putting the read and write into a case structure in that timeout event. Having a time check, or even a resetable counter (use a shift register on the loop) to determine whether to write or read, with an event for the operator to stop the whole thing. I do a diagram, but have a meeting in a couple of minutes :-)
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How to save 7.0 VI's flat sequences properly as Labview version 6.1

    Labview 7.0 has a Save for previous option that allows the vi to be saved as 6.1 vi. In attempt to
    do that with a VI that has flat sequence, a stacked sequence got added in the VI and a lot of things
    got screwed up. Is there anything out that that will allow me not to happen, rather than manually change
    the whole VI, which is going to be very time consuming?
    Any help will be greatly appreciated.
    Ratin

    Since LV 6 does not support a flat sequence, I'm afraid you are stuck with making the modifications yourself.  Have you tried going to the 7.0 block diagram, right clicking on the flat sequence, and selecting Replace with Stacked Sequence?  If this is successful, then you could save to previous version.
    - tbob
    Inventor of the WORM Global

  • How to break a flat sequence structure ...??

    How to break a flat sequence structure into two flat sequences structures......i am a student learning labview....help me..

    To accomplish what you want you need to basically write some really ugly code. This is a side effect of using the flat sequence structure in the first place. This is exactly why they are not recommended.
    First and foremost you will need to place your frame structure inside a loop. This will control how many times you execute the code.
    Now you have a few alternatives to skip the first three steps which are kludging but time is of the essence.
    1. Place a case structure around the code within the first three frames. Each frame will have a case structure. You can use the loop count to control only executing the code the first time through the loop.
    2. You could combone the code of the first three frames into a single subVI and then use the same approach described above to skip executing that subVI.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Error when using class wire in flat sequence

    I tried a search and didn't find anything on this.  I have a VI that I was going evaluate its execution time.  So to be quick about it, I encased the code in a flat sequence box and added a second frame, place a Get Date/Time in seconds in each and found the difference.  When I did this, my program had errors.  It appears that I have to wire the class inputs and output outside of the sequence structure or an error is generated.
    VI is reentrant although I doubt that makes a difference.
    I get the following error:
    Terminal: One or more of the inputs to this tunnel or shift register does not orginate at the dynamic input front panel terminal
    Error case:
    Error is fixed
    Does this seem like expected behavior?
    Randall Pursley

    I would not say it is "expected" behavior but quite possibly it is very correct behavior  (Read as "almost certainly").
    "Wrap-your-head-in-duct-tape" and read message 12 of this thread carefully. Dynamic terminals that are on the connector pane determine which DD vi is actually called at run time.  Unless those terminals are on the root diagram there is a chance they could be conditionally read or even in dead code (imagine the sequence frame was replaced by a case structure since all structures are treated as "structures")  this breaks "inplaceness" and if not resolved, by placeing the terminals on the root diagram, LabVIEW would need to determine at run time wether or not a buffer allocation was required.  Thats not really possible.
    Perhaps R&D will explain it in greater detail?  But, the way to avoid this error is to pay attention to terminal that are on the con pane and alwasy keep them on the root diagram (It's more effecient code in any case).
    Secondly, the first get date time should be moved outside the sequence and wired through frame 1 to force it to execute before any othe code in the frame. 
    Jeff

  • Nested Sequences Bug is finally fixed?

    I just noticed that Apple seems to have patched a significant bug in FCP with the last update.
    According to my own tests, Nested Sequences now update automatically and consistently without having to be re-added or refreshed in the timeline.
    Nesting is when a sequence is placed into another sequence. Complex projects may involve several layers deep of nesting, but FCP users have been wise to avoid this useful technique because it just didn't work right.
    For example, if I were to build a neat animated logo sequence, then nest it inside a standard footage sequence, the animation would play through and be scalable like any other footage. This allows for a simpler "master track" timeline based workflow where everything is not placed into the same huge sequence.
    In the past, the sequence containing a nested sequence would not get updated if one made a change to the nested sequence after placing it. So if I were to change the animated logo sequence mentioned above, the change would not show up in the footage sequence that hosts it. I believe this has finally been fixed in 5.04
    The nested sequence bug is a very old issue that dates back to version 1 of FCP and has been a real problem for me because of my high-volume workflow. I've been reporting the problem at Apple's feedback site and it appears they finally listened.
    Why nest? Nesting is also very useful when format converting or adding letterbox, etc. I mostly use nesting because I have 100's of TV commercials that are identical but use different phone #'s. For this I nest the nearly completed spot into new sequence where the phone number is added. I can then have 100's of sequences that only contain the stuff that changes. I don't have time to explain why this works better than just rendering the master track for me, but it does.
    Has anybody else noticed this fix, or am I just dreaming here? I really am excited about this.

    It was fixed as I described until about a month ago, when I noticed the problem was back. This could have coincided with an OSX update. It also might have been the update to QuickTime or Pro Applications Support as well. I don't know. But the problem is back and I noticed it "the hard way" during a dub. Sorry for not amending my post when I noticed this.
    This is a problem that Premiere and Avid users NEVER experience, FYI. It is a critical bug in my opinion. I believe Apple could fix this with just a few lines of code, but it seems like it just isn't on the priority list. We need to get busy with the Apple Feedback forum requesting the a fix (again). Please everybody that reads this should post a request at that forum for a fix. Thanks!

  • Continuous loop for flat sequence

    Hi, I currently using LabVIEW 8.2 and still learning about LabVIEW. I’m doing a project on a FMS model using USB 6501 to run the program and I’m required to run the program continuously. I was given a program from a previous student and I’m supposed to modify the current program.  The purpose of the program is to gather stock from the warehouse and place it in a different slot.
       I have a sample of the program and layout of the model where the lift is to move to the left and back to the right. I’m currently stuck as I can’t figure out how to run the flat sequence continuously.
      Firstly, it would just run once and stop at the right even when I’m using while loop.
      Secondly, when pressing the stop button it wouldn’t stop the program midway, it would continue to run until the frame ends. Is there a way to stop the frame when an error occurs?
    Please advice. Thanks.
    Attachments:
    LIFT LOOP.vi ‏288 KB

    You definetly have to switch to a reliable architecture!
    I think that your application must have several security features to prevent damage of hardware or even humans. So you must not use a program which just moves the lift from startpoint to endpoint without any chance to break the movement!
    That being said, i see two approaches:
    a) Statemachine
    b) Producer/Consumer
    The backdraft of Statemachine is its polling character. So you can only react to "worst cases" only within your given timeframe. The timeframe is the polling time plus all latencies including signal delays and similar. This can easily add up to about 1s and more.
    Producer/Consumer can possibly react a little faster if it is event based. The backdraft is that you need a rather good knowledge of LV in order to implement this properly.
    Another thing for applications like this are latencies created by the OS. Maybe it is necessary (not only recommended) to switch to a RT system or even FPGA in order to keep proper reaction times.....
    Maybe it is a good idea to talk about this application with an NI Alliance Member .
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to execute a frame of a flat sequence structure for a specified amount of time?

    Hello,
    I have a timed loop measuring a resistance value every 2 seconds. I would like to have this timed loop execute for a specified amount of time (e.g. 5 minutes). The timed loop itself is placed within a flat sequence structure so I am concerned that the measurement will be taken once and the next frame will begin to execute, without waiting 2 seconds for a successive reading (and not looping for, say, 5 minutes).
    In other words, is it possible to have a frame of a flat sequence structure execute for a specified amount of time before moving onto the next frame?
    Thanks for your assistance!
    JFK_Aero
    Solved!
    Go to Solution.

    All code in one sequence frame must complete before the next frame can execute.  So as long as your timed loop is setup correctly, the next frame cannot run until your 5 minutes is up (N = 5 minutes/2 seconds/measurement = 150 measurements).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Timed loop inside a flat sequence not terminatin​g

    Inside a while loop there is an event structure.  Inside that there is a flat sequence.  On one of the frames there is a timed loop that quits after so many iterations.  The timed loop finishes but the flat sequence doesn't execute the next sequence.  What am I not doing right?

    First, you have too many local variables.  This could be leading to race conditions.
    I think you have a couple problems in the use of event structures.  It is a bad idea to put any long running code inside an event case.  It will prevent the Event Structure from handling any other events in the mean time.  You have several timed loops running that in that one sequence frame.
    But the bigger problem is the next sequence frame.  You have a while loop that only ends once all the queues are empty.  Can you guarantee that all the queues get emptied?
    You have laid out the code very neatly, but you have used a lot of odd things in there.  (Number to boolean array, to cluster, to unbundle the cluster to individual indicators.)  Why not just go from Boolean array to and index array function.  No need for the intermediate cluster conversion.  Why not set up the indicators as an indicator array and just write to them directly.
    The code is so much intertwined between when queues are created, filled, emptied, destroyed, events happen...  And this is all multiplied by at least 4 times for each camera.  And there are 4 major event structures going on.  This is a very ambitious project for an inexperience LabVIEW user.  You need to step back, get one thing working right, and design so that you can scale the architecture upward.  Many of the structures you have essentially duplicated and belong in subVI's.

  • Where can i find flat sequence in a function palette

    Hello
    Where shall i find flat sequence in the function palette of LabVIEW 6.1 version.
    Please have a look at the VI in LabVIEW which i developed using LabVIEW 7.0 version, in which i used flat sequence.
    Jayaprakash
    Attachments:
    Flat sequence.doc ‏79 KB

    Hi
    The flat sequence is just available in LV version 7.0 and newer.
    In LV 6.1 you have to use the stacked sequence-structure.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • LED in flat sequence event

    Hello,
    I have 2 flat sequence event with 1 LED in each event. How do I turn on the LED when the event start and OFF when the event complete before it move to next event.
    Please help.
    Thanks,
    Solved!
    Go to Solution.
    Attachments:
    LED.vi ‏7 KB

    Those are not events in the sequence. Those are individual frames. Events in LabVIEW are something completely different. Based on your question it seems you are not completely understanding dataflow. A function/VI will execute when all data on the wires connected to it is present. Dataflow can be used to enforce execution order, but sequence frames can also be used.
    In your first frame if you wire a True constant to the Boolean you cannot control when the Boolean is updated since there is no data dependenct between the numeric calculations and the writing of the LED. Thus, if you want to turn on the LED before the first frame then you need to add a frame before the first one where you set the LED, and the same thing at the end.

  • Measure the time in a specific frame of a flat sequence

    Hi I have a labVIEW program with a flat sequence and I would like to stick in a small SubVI which measures how long it stays within an individual frame to confirm the delay I have used. Does anyone have any code or any tips on what I could add which sets a timer going when I enter the frame and spits out the answer to a numeric indicator when it goes to the next frame.
    Any help would be appreciated 

    srikrishnaNF wrote:
    hi mr_nice,
      Use time elapsed vi...
    Thanks and regards,
    srikrishnaNF
    Please add where you find this vi.
    Check out this video here. It might be useful for you when he talks about the flat sequence structure and how to get elapsed time from it. It starts at about 7 minutes into the movie. He's using Tick Count.
    Also here you can find useful information
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway

  • CS4.2 - Nested Sequence bug!...

    I seem to have stumbled upon a bug in Premiere CS4.2 (it is probably present in all versions of CS4)
    I am trying to build some professional looking transitions, but to accomplish them I am having to nest sequences (though it would be nicer if I could add effects to transitions themselves to avoid nesting [cough] Adobe[cough], or be able to use transparent video clips as adjustment layers)
    Anyhow, 2 things: One, On my main timeline I have the Push Transition between two clips set to go from Top to Bottom (doesn't have an issue when going side to side)
    Second, I have a photoshop file being used  elsewhere on the timeline with a scale effect to use as a transition (going from 600% to 100% with no other motion).
    (Both are having the same issue - below)
    I have the Photoshop file and the Push transition on my main sequence which is then nested into another sequence so I could add a blur effect to the transitions, and then I have that sequence nested into a third sequence that is set to square pixels so I can output a quicktime to Youtube (the original 2 Sequences have a 1.21 widescreen aspect in case I want to go to dvd)
    My issue is that on the Square Pixel Sequence both the Top/Bottom Push Trans and The Photoshop file seem to get pushed over revealing either a black edge or the track below it. (which only happens at these points in the timeline, the rest is fine)
    But everything is fine in the other two sequences! So I'm not sure what's causing this issue other than a bug in Premiere.
    Just FYI, I did also try turning all the effects off (except the Push transition), but that didn't change anything.
    Thanks all for any help, (or a new CS4 update - wink, wink)
    I hope this is clear enough.
    Aza

    There's a point that I don't understand, shouldn't a un-optimul workflow (using clips that require a lot of rendering power from the cpu and disk access) cause things to slow down or frames to drop?
    Why would such a situation cause every frame to be played with cpu and disk access to spare but cause frames to be played in the wrong order? I've never encountered anything like this before.
    There are no stuttering or gaps between frames, just frames being played as if the clips were in the wrong order.
    Example:
    Sequence A contains Sequence B then C
    Sequence B: Clip 1, 2, 3, 4
    Sequence C: Clip 5, 6, 7, 8
    Playing from Sequence A: Clip 1, 3, 2, 4, 5, 6, 7, 8
    Playing from Sequence B: Clip 1, 2, 3, 4
    Playing from Sequence C: Clip 5, 6, 7, 8
    Playing from Sequence A (again): Clip 1, 2, 3, 4, 5, 6, 7, 8
    *Wait a while, do something else*
    Playing from Sequence A: Clip 1, 3, 3, 3, 5, 6, 8, 7
    (Different order happens)
    No clips or frames were ever dropped.

Maybe you are looking for

  • Raid problems installing OS

    Ok, got through the wiki all the way to the setting up arch part! Thought I was out of the woods, but getting stuck at the preparing HD section.... I think the array and drives are setup properly, but I still show 2 drives /dev/sda and /dev/sdb if I

  • Opening word document with linked PPT inside

    Hi everybody, this is an error occuring using KM functionality, which could also be cause by the local Microsoft environment, but perhaps anybody knows this ... We are using EP 6.0.2.4.8 with CM 6.0.2.4.6 In several KM navigation iviews we have linke

  • What are timecode breaks and why do they happen?

    I am trying to capture a tape from a Canon GL2, and it has tons of TC breaks. I have read the previous posts on TC breaks and I think I know how to work around them, but I don't quite understand what they are and why they happen. Does it mean the tap

  • Can I use Photoshop Elements 8 to create printable items for commercial purposes?

    I like to create printables for classroom use using my Photoshop Elements 8 that I purchased about 4 years ago.  I would like to be able to sell these items on www.teacherspayteachers.com, but I am not sure if I can leagally do that.  Can Elements be

  • Port Replicator 40Y8132 Compatibility

    Greetings, Does anyone know for certain if USB Port Replicator 40Y8132 can work with ThinkPad Edge E420? I know it's a discontinued replicator but I don't see a reason why it wouldn't work, it's just a USB connection. I read something about compatibi