The Natt Sequence is a mini-pattern used for executing LabVIEW code sequentially. It has multiple benefits over other sequential code constructs (like the Flat Sequence, the Stacked Sequence, or the Sequence Loop), including:
The Natt Sequence template VI and its supporting VIM can be used in LabVIEW 2017 SP1 and later.
Note: The Enum to Array of Enums.vim ships with LabVIEW 2020 and later and is available in Quick Drop/palettes.
(bit.ly/nattsequence redirects here)
I tried using this in LabVIEW 2017, but it's not working. The "Enum to Array of Enums.vim" returns 65.536 elements each time and not the number of elements in the cluster.
@Ludwig72 wrote:
I tried using this in LabVIEW 2017, but it's not working.
Sorry about that. There is a bug with VIMs in LabVIEW 2017 that prevents the Enum to Array of Enums.vim from working properly. But this bug was fixed in LabVIEW 2017 SP1. I have updated the original post above to indicate that LabVIEW 2017 SP1 or later is required.
@Darren wrote:
Sorry about that. There is a bug with VIMs in LabVIEW 2017 that prevents the Enum to Array of Enums.vim from working properly. But this bug was fixed in LabVIEW 2017 SP1. I have updated the original post above to indicate that LabVIEW 2017 SP1 or later is required.
Thanks Darren, this seems to be the solution - and one more reason for me to change to the newest version.
Thanks for sharing Darren. I've seen variations on this over the years and I still think I prefer an array of string constant as the input. The reason is because I'll resize the array of string to show all of the elements, and then the sequence steps itself can be seen without having to click on the enum constant to see the values and order. This also allows for reusing of states, but to fair in such a simple piece of code I rarely use it for that.
Using the array of string constant does have the downside of losing the enum typing so it is possible to have a typo that goes to the default case. But honestly this doesn't happen very often. I usually find myself copying from the case to the constant or the reverse, and even if there is a typo it will be found quickly and not happen again. I mean it isn't some string manipulation creating it, it is just a constant so once its right you're good.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord