Jump to content

Subdiagrams? Node groups? One-off subVI's that don't need a separate file? Is this as useful as it looks?


flarn2006

Recommended Posts

Has anyone else wanted to be able to simplify their block diagrams without saving lots of subVI's that will only be used once? Like an embedded subVI? I feel like I must be missing something because as far as I can tell, this functionality is already 99% of the way done, and not even hidden. LabVIEW just doesn't ship with one that you can actually put whatever you want inside. And yet, this feature can be trivially created using what I'm pretty sure are all officially-supported LabVIEW features:

subdiagrams.png.c7519bf4c7f7a61790f2066536600d0d.png

This is nothing specific to VI scripting; that's just what I decided to use for the example as scripting diagrams tend to become unwieldy pretty quickly. Yes, that's an Express VI. Except instead of a configuration dialog, it opens a blank VI to edit. You can double-click on it to open the VI for further editing. It all saves inside the main VI. And it doesn't even add any dependencies to the VI—dependency-free—the only thing you need the express VI files for is if you want to conveniently edit the contents without converting it to a regular subVI; it'll load and run perfectly fine.

Here are the files just in case, but it's not quite refined yet. And again, there might even be something I'm unaware of that makes this unstable or poorly compatible or something, as I don't recall ever seeing this technique used before, and it seems like something that would ship standard with LabVIEW.

_SubdiagramConfig.llb

SubdiagramSource.llb

This is probably better for Code In-Development, but I already typed it all out and uploaded/placed attachments here before realizing, so hopefully a moderator won't mind moving it there for me if I can't do it myself.

Edited by flarn2006
Link to post

Interesting, although I'm not sure how often I would actually use this feature. If I'm working out of some class or library I've never really been concerned with creating a subVI that may only be called that once and just throwing it into some private-scoped virtual folder.

I've created quick drop shortcuts in the past and that's probably been the only time I remember when I would have wanted a feature like this (lots of sequential logic and more convenient to just distribute a single VI).

Sharing example code might also benefit from this (although other users would probably be confused).

Link to post

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.