Jump to content

Structure wishes


Recommended Posts

Hi all,

in addition to the 'exit for loop' discussion over at NI, i have the following wishes:

'Merge Flat sequence structure', this would allow to merge two sperate sequence structures into one,

'Split Flat sequence structure', allow you to ad a sequence based on selected items

'swap sequence structure', swaps sequences

'dynamic select case', maybe based on rings

any other options?

Ton

Link to comment

Why not use a state machine?

I can appreciate your desire for additional functionality, but sequence structures are not as flexible as a state machine. Do you continue to use sequences regularly in your code :blink:

If you use state machines, you can do much of what you want. Use typdef'ed enums to drive the cases in your state machine. If you need to add a case, edit the typdef, add the case in your while structure and voila! You can rename your cases by editing the typdef, you can duplicate a case intead of add, then delete redundant parts from each to "split" the "frame".

I can't begin to imagine the problems merging two sequences with their own locals especially if each contained controls, indicators and local variables (as they too often do :P ) The sequence structure reminds me a bit of line numbers from BASIC, they continue to exist primarily for compatability.

One of the things I've noticed on the NI discussion forums you reference is that most people say "don't mess with what works". Sequence structures ARE useful when you need to control data flow, but don't try to turn them into a state machine or you'll go crazy. I've debugged too many sequences inside sequences inside sequences with 15+ frames each. The inner most sequences are often cut/paste from previous upper level frames. These are much more easily handled and modified using sub-vis, loops and a state machine.

"Queued State Machines: Where do you want to go today?" (Oops, that slogan is already taken :nono: )

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.