From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need help understanding the sequence structure in a certain example

Solved!
Go to solution

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kFKrSAM&l=en-US

Could someone explain to me why is the sequence structure is implemented in that example? seems to me that its unnecessary here as I am getting the desired outcome without as well

0 Kudos
Message 1 of 11
(1,518 Views)

Hi Amr95,

 

IMHO it is only used to highlight and document the "Reset logic - replace with your code" part in that example.

 

Regards, Jens

Kudos are welcome...
Message 2 of 11
(1,509 Views)
Solution
Accepted by topic author Amr95

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 3 of 11
(1,508 Views)

@Kevin_Price wrote:

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P


Yeesh, that's what decorations are for.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 11
(1,446 Views)

T


@billko wrote:

@Kevin_Price wrote:

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P


Yeesh, that's what decorations are for.


True.  But the problem with decorations is that they don't really stick that well with respect the code.  Like if you click block diagram cleanup, it will no longer surround the code you originally intended.  So I do understand why a flat sequence frame can help segregate and identify it for an example.

0 Kudos
Message 5 of 11
(1,428 Views)

@RavensFan wrote:

T


@billko wrote:

@Kevin_Price wrote:

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P


Yeesh, that's what decorations are for.


True.  But the problem with decorations is that they don't really stick that well with respect the code.  Like if you click block diagram cleanup, it will no longer surround the code you originally intended.  So I do understand why a flat sequence frame can help segregate and identify it for an example.


Good point.  Same with free labels.  I keep forgetting this because I very rarely use the cleanup tool.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 11
(1,425 Views)

@billko wrote:

@RavensFan wrote:

T


@billko wrote:

@Kevin_Price wrote:

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P


Yeesh, that's what decorations are for.


True.  But the problem with decorations is that they don't really stick that well with respect the code.  Like if you click block diagram cleanup, it will no longer surround the code you originally intended.  So I do understand why a flat sequence frame can help segregate and identify it for an example.


Good point.  Same with free labels.  I keep forgetting this because I very rarely use the cleanup tool.


Also, you missed that you can select that sequence structure menu>> edit >>create sub vi from selection and your code goes there in that subvi.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 11
(1,412 Views)

@JÞB wrote:

@billko wrote:


Good point.  Same with free labels.  I keep forgetting this because I very rarely use the cleanup tool.


Also, you missed that you can select that sequence structure menu>> edit >>create sub vi from selection and your code goes there in that subvi.


I really liked the Create SubVI feature when it was added.  It let's me start working on some code logic, then when I realize, hey this is getting a little big and needs to be broken into its own subVI, then a couple clicks, some cleanup, and I've modularized that piece of code.

 

One nice addition to free labels is that you can drag from the corner of them and towards a block diagram object and it will attach the label to where you connected.  Now when you do a cleanup, that comment will stay linked to that item.  It may not always leave it quite like you want, but close enough to adjust it and still linked.

0 Kudos
Message 8 of 11
(1,406 Views)

 

I really liked the Create SubVI feature when it was added.  

 

.......

Uhmm I am fairly certain that 4.0 had it I know 5.1 did though it may have been a right-click option.  It was not undoable even when undo after save came around and it did not unmake space Leaving huge blankspaces in the caller that had to be manually cleaned.  It chose Conn panes poorly and wired them all in reverse z order back whenever.   Recent versions have made it a wonderful tool for creating shell code for your lvlibs.  The error no error case or single frame sequence structure integrated Structure labels make great places to drop requirement covers statements


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 11
(1,393 Views)

@JÞB wrote:

@billko wrote:

@RavensFan wrote:

T


@billko wrote:

@Kevin_Price wrote:

You're right, it's unnecessary for the example as written.  It appears to be used as a simple "bounding box" to illustrate which part of the code might need to be changed to fit the user's specific situation.  Nothing about the sequence of execution is changed by its presence or absence.

 

 

-Kevin P


Yeesh, that's what decorations are for.


True.  But the problem with decorations is that they don't really stick that well with respect the code.  Like if you click block diagram cleanup, it will no longer surround the code you originally intended.  So I do understand why a flat sequence frame can help segregate and identify it for an example.


Good point.  Same with free labels.  I keep forgetting this because I very rarely use the cleanup tool.


Also, you missed that you can select that sequence structure menu>> edit >>create sub vi from selection and your code goes there in that subvi.


That was outside what I considered the scope of my post, which was just that it seems that using the sequence structure as an organizer wasn't the best use for it, but yes, I use it a lot to create subVIs from existing code.  And that feature has been getting better and better.  I avoided the first few iterations of "create subVI" because of the horrendous way it organized the front panel, and the strange layout of the connector pane.  Nowadays, it's been refined to the point where sometimes it's acceptable to leave it the way it is, and most times only minor adjustments.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 11
(1,329 Views)