|
|||||||||||||
Who has ever made a cluster typedef, then added some elements, then added more, then a little more? Have you noticed the "typedef explosion" of your block diagram as a result, with constants overlapping other code? Make a right-click option to "link" a bundle by name to a typedef. Note that the two pieces of code below would be identical, but the bundle on left would not suffer from typedef explosion. In addition, have a selectable menu
Another idea is to link the bundle to the destination:
Personally I don't like the idea of 'linking' to a type def since it would be hard to no which type def you are linked to.
However, I do hate the 'explosions' as well, especially if you have painfully auto arranged all the clusters in the typedef to be horizontal and when you make a change to the type def (don't even have to add an item) it defaults back to vertical arrangement.
You can get around that and the amount of space that they take up by selecting the constant and creating a SubVI for it. That way you can give it a nice icon,and if you set the VI properties to re-entrant/pre-allocate you can use it multiple times and set you constant values in the subVI.
This is a little time consuming so I only do it for really large clusters but if that functionality could be automated it would be perfect.
I think Lavezza has the most elegant solution yet - better than my original proposal. The icon would feed the "input cluster" terminal of the unbundle, and the icon would compile down as efficiently as a BD constant.
Double clicking on the icon would bring up the editor window that allows editing of the constants. This way, each icon could have its own initialization, not just the default values for the cluster.
tst - true, the initial values would be hidden. Let's say hovering over the icon would bring up the initial values in Context Help. I would rather live with this than Typedef Explosion.
We just need a way to take CTL file default values OR provide custom values values (maybe a right click option with check mark) when this is implemented. In any case, we're talking about gaining since a developer can still revert to the old method when applicable.
This could be implemented well along with Add block diagram design for typedefs.
You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet, please register and log in.
Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page