LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
tst

Create a proper connector pane when doing Edit -> Create subVI

Status: Completed
Available in LabVIEW 2011

When creating a subVI from a selection, LabVIEW should do two things:

  1. Use the user's default connector pane pattern instead of selecting one matching the number of inputs and outputs. This will make easier wiring and allow users to add more IO later.
  2. If the user is using a "standard" pattern (e.g. 4-2-2-4), LabVIEW should try placing the error clusters at the bottom corners and objects or references at the top corners.

It should also try to make the FP of the subVI cleaner, but that's another matter.


___________________
Try to take over the world!
21 Comments
MikeS81
Proven Zealot
I think it's not in accordance to style guide to create your vi in this way. 🙂 Normally you should plan your vi before you create it and then you know which connector pane you need.
Message Edited by MikeS81 on 06-04-2009 02:23 PM
tst
Knight of NI Knight of NI
Knight of NI

I do know which connector pane I need - it's almost always the 4-2-2-4 one. Now I want LabVIEW to know this as well.

Changing a piece of code to be a subVI is a reasonably frequent operation and it hardly ever selects the correct pane and connections I want, unless the code I create it from already happens to be clean enough, and even then not always.

 

Another annoying example is that it creates the style (and name) of the error out terminal based on error in control instead of the output in the calling VI.


___________________
Try to take over the world!
JackDunaway
Trusted Enthusiast

I'll have to offer a "pared-down" version of this suggestion: just allow the default connector pane to be an environment option. It would take a lot of assumptions for LabVIEW to properly "guess" how you want to engineer your subVI standards. (Consequently, I also am not a fan of the block diagram cleanup. It's a mondo NI creation that actually hinders those who have come to appreciate BD design based on the style guide).

tst
Knight of NI Knight of NI
Knight of NI

LabVIEW is already "guessing" how to wire, but it almost always guesses wrong. I would rather it guessed according to common practices. If there was a way to teach it what your preferences are, that would also be nice.

 

As for the auto cleanup, during development it often happens that I let the code get messy because I know I don't know the entire scope of the code, so I prefer writing it and then cleaning it up. So far, the auto cleanup feature has rarely produced results that I like, so I usually don't use it, but it's only at its first revision, so I'm not giving up on it yet.


___________________
Try to take over the world!
RoyA
Member
Vote for my "'Create SubVI' or 'New VI' DEFAULT Template' idea which incorporates your wishes, plus more!
tst
Knight of NI Knight of NI
Knight of NI
Further enhancements (adding a case structure based on the error in input and optionally cleaning up the diagram) are suggested here.

___________________
Try to take over the world!
JackDunaway
Trusted Enthusiast
It took long enough, but I have fully "come around to [your] way of thinking". Participation on the forums changes a wiring man.
KittF
Member

There are a couple of entries for this idea.  I hope NI is combining the votes for this idea(s).

 

I'm torn as to whether to create a new idea, but I will instead post this in the 3 Create VI Ideas that I found. 

 

I'd like to add a few more more feature to this idea.  

 

1)

When creating a subVI, it should ALWAYS have the option to add Error In and Out to the connector pane, even if the code does not have error handling implemented (e.g. math operations).  If the Error In/Out already exist, then it uses these.  If not, create them.   

 

2) 

This is harder due to all the options, therefore I have an additional suggestion. This problem has already been solved .... conceptionally.  If you have every used the DLL Wizard that writes wrappers around DLL function calls, you will see that

a) it prompts you on how to handle errors,

b) it makes its 'best guess' at how to wrap the function call, and allows you to modify the 'best guess'.

c) it always has error in/out in the bottom corners

d) it allows you to choose a icon template for the wrapper. 

 

The solution for creating a subVI should be similar and might be able to reuse the framework from the DLL Wizard.

Ray.R
Knight of NI

I don't use the create sub-vi feature because, frankly, it's dissapointing and messy... mostly dissapointing.

 

At a minimum, it should do the following (and I quote):

 

1) When creating a subVI, it should ALWAYS have the option to add Error In and Out to the connector pane, even if the code does not have error handling implemented (e.g. math operations).  If the Error In/Out already exist, then it uses these.  If not, create them.  AND it should always place them at the bottom.

 

2) If the user is using a "standard" pattern (e.g. 4-2-2-4), LabVIEW should try placing the error clusters at the bottom corners and objects or references at the top corners.  As a matter of fact, the standard pattern should be the default.  Anything bigger, it should offer a choice to proceed with the standard or with a different size or none.

 

 

MichaelAivaliotis
Active Participant

I would also add that the terminal naming needs to be improved. If there is a possibility of duplicate names because LabVIEW can't find data names then it labels things like: Numeric and Numeric 2. Why not call them Numeric Input and Numeric output? Or Numeric Input 1 and Numeric Input 2?

 

Another thing I would love to see is grouping of input controls on the front panel on the left side and outputs on the right side. Ideally positioned in the same relative location as the terminals they are wired to.



Michael Aivaliotis
VI Shots LLC