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.
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.
06-09-2021 08:41 AM
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
Solved! Go to Solution.
06-09-2021 08:50 AM
Hi Amr95,
IMHO it is only used to highlight and document the "Reset logic - replace with your code" part in that example.
Regards, Jens
06-09-2021 08:50 AM
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
06-09-2021 10:28 AM
@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.
06-09-2021 12:20 PM
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.
06-09-2021 12:31 PM
@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.
06-09-2021 02:54 PM
@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.
06-09-2021 03:12 PM
@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.
06-09-2021 04:23 PM - edited 06-09-2021 04:29 PM
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
06-10-2021 03:04 AM
@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.