LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Queue to existing vi


@Hobbs23 wrote:

This is the third time I have heard that stacked sequences are not good, which gives me pause. I have yet to hear of any reason yet


The biggest reason is that they break data flow.  Data flow is the heart of LabVIEW programming.  When you break data flow, you eliminate potential for the compiler to do a better job.

 

Stacked Sequence Structures also limit reuse.  Imagine you have to do a wait after each step in your sequence.  You have to add that wait X times.  If you used a proper state machine, you could reuse that single state.

 

As already stated, sequence structures have to run linearly to completion.  If you use a state machine, you can abort early, skip steps, go back to previous steps, etc.

 

And going with a state machine that is string or enum based (either one works), you add self documentation since your case structure will tell you exactly what that state is doing (assuming you named your states well).

 

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 28
(688 Views)

Hey RavensFan

 

Thank you for giving me the reasons for not using sequence structures. It seems even to me that those are plenty good enough.

 

You wrote: I don't understand what you are referring to by binary values in this situation or how sequence structures help that.

 

I was referring to a Case Structure as only a true/false state, but then you can add more frames after to expand beyond two states.

 

You wrote: While DOS 6.22 was great, that was back in 1994.  Comparing sequence structures to 23 year old technology doesn't help your argument.Smiley Wink

 

I wondered who I would draw out with this comment. 🙂 Consider it an abstract way of conceding that after hearing for the third time not to do something, that the knowledge level here is more than sufficient to start conceding to the mounting pressure. (We still run DOS 6.22 here on 1 machine. Funny, I never get asked for an update) 🙂

0 Kudos
Message 12 of 28
(685 Views)


(We still run DOS 6.22 here on 1 machine. Funny, I never get asked for an update) 🙂

If DOS still works for your application, why fix something that is not broken?

========================
=== Engineer Ambiguously ===
========================
Message 13 of 28
(680 Views)

RavensFan

 

I may have made the mistake of lumping Case Structures in with Sequence Structures. Should I have included them in the conversation about Sequence Structures not being good choices?

0 Kudos
Message 14 of 28
(670 Views)

Hello Yamaeda

 

I've been looking for the Event Sequence in my LabView 2009. There are some associated with Visa, in the advanced section. Will these work for what you were talking about?

0 Kudos
Message 15 of 28
(665 Views)

@Hobbs23 wrote:

I've been looking for the Event Sequence in my LabView 2009. There are some associated with Visa, in the advanced section. Will these work for what you were talking about?


Event STRUCTURE.  It is right there in the Structures palette.  Very hard to miss.  It is pretty much a requirement when dealing with GUIs.  With it, you can detect button presses, mouse movements, value changes, panel closing, drag and drop events, and more.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 16 of 28
(663 Views)

Not that I can find. It may be time we examined the premise. Not trying to be impolite, but completely baffled.

0 Kudos
Message 17 of 28
(657 Views)

Let me guess: you have LabVIEW 2009 Base Development.  Before LabVIEW 2012, you needed the Professional edition to have the Event Structure.  If possible, try to upgrade.  Like I said before, the Event Structure is pretty much a requirement for a good GUI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 18 of 28
(649 Views)

@crossrulz wrote:

Let me guess: you have LabVIEW 2009 Base Development.  Before LabVIEW 2012, you needed the Professional edition to have the Event Structure.  If possible, try to upgrade.  Like I said before, the Event Structure is pretty much a requirement for a good GUI.


Look again crossrulz No InPlace Elements structure.  And old "S,L,G, Variable icons".  8.6 or earlier. but post 6.i ( which did not have FB Nodes or BD Decorations)

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 19 of 28
(642 Views)

Jeff·Þ·Bohrer wrote:

Look again crossrulz No InPlace Elements structure.  And old "S,L,G, Variable icons".  8.6 or earlier. but post 6.i


The OP specifically said they were using LabVIEW 2009.  And the NES was added to the Structure palette in LabVIEW 2010.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 20 of 28
(630 Views)