Skip to main content

Subscribe to our Newsletter

Sequence in LabVIEW

Sequence_in_LabVIEW.png

There are times when I have to execute code in sequence.  This can be a long chain of VI's as seen below.  

 

Inserting, deleting, and moving around vi's can get to be a pain.  This can also get hard to read as you a looking at potentially a lot of vi's.  The native sequence structure in LabVIEW doesn't support shift registers and you can't name the states.  

Sequence_Structure_2.png

There is an enum to an array of enums function in LabVIEW 

Enum_to_Array_of_Enums.png

The function is located in the Numeric Conversion Pallete

Pallet_for_Enum_to_Array_of_Enums.png

 

What I like to do is create a case structure that has all the states specified in the enum.  Each state is an action in the chain of VI's.  You can also have shift registers containing class data or any other data you might need.  This makes the code much more readable and easier to maintain.

Sequence_in_LabVIEW_2.png

 

No comments

Leave your comment

In reply to Some User

Copyright © 2024 Automated Software Technology LLC All Rights Reserved.

Joomla! is Free Software released under the GNU General Public License.