05-06-2008 09:10 PM - edited 05-06-2008 09:11 PM
05-07-2008 01:21 AM - edited 05-07-2008 01:24 AM
Hi krispiekr…,
here is another solution to create the example array.
Mike
05-07-2008 06:41 AM
Ray,
I am curious about one of your comments, as I have seen several similar inferences in the past. What is it that so many developers have against stacked sequence structures? It seems to me that when you have a section of code that would fill the screen 3 times over, it makes more sense to create a stacked sequence than to make up a couple of artificial states that always operate sequentially. Is there something that I don't understand about how LabVIEW operates that makes this not true? I've been using LV for several years and can do alot with it, but I still have alot to learn about HOW it works.
05-07-2008 07:42 AM - edited 05-07-2008 07:43 AM
05-07-2008 08:11 AM
Jeff has good comments.
But whenever people use a stacked sequence structure they tend to add to them.
I have fix bugs one time too many where they hise a bloody stack sequence in a Case structure only to find out that the upper stack sequence has 55 frames, and within each frame there are stack sequences of up to 15 to 25 frames, and to top it all, they have within some of the stack sequence frames a third layer of up to 10 frames.
Ever debug such a mess?
If you design your code well, it should not go much beyond one single screen.
Some architect System Integrators (companies) have templates that limit the size of a given VI. They also forbit S-S-Structures & Locals. I agree with them. They must have had some similarly bad experience.
As with anything in life, it may be ok as long as it is not abused. But I can't say anything positive about Stacked Sequences. 😞
Oh.. And using a Local Variable to pass data from one spot to another when they are next to one another is just not right! They are abused way too often.
Keep it simple, keep it clean and comment the code. And read the Rube Goldberg thread: http://forums.ni.com/ni/board/message?board.id=BreakPoint&thread.id=2634
05-07-2008 08:46 AM
lmtis wrote:
What is it that so many developers have against stacked sequence structures? It seems to me that when you have a section of code that would fill the screen 3 times over, it makes more sense to create a stacked sequence than to make up a couple of artificial states that always operate sequentially.
There are plenty of alternatives, such as state machines and subVIs. Always think outside the sequence frame box! 😄
Here are two examples of functionally the same code. Which one is easier to debug? Which one has a higher potential of accidental wiring errors?
(See also: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=230714)
05-07-2008 08:49 AM
05-07-2008 10:30 AM - edited 05-07-2008 10:40 AM
05-07-2008 10:32 AM - edited 05-07-2008 10:33 AM
05-07-2008 10:36 AM