LabVIEW Shortcut Menu Plug-Ins

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Coercion Dots.llb

Author: Karsten van Zwol (NI)

This plug in assists with removing coercion dots from you block diagram. It adds the option 'Insert Conversion Function' when you right click a wire or a selection that includes wires that has at least one destination terminals with a coercion dot. When activated it inserts the appropriated conversion function(s) based on the terminals with the coercion dot.

Before:

before v2.PNG

After:

after v2.PNG

The attached llb is saved in LabVIEW 2015. For install instructions, go here.

The attached zip file also contains a Quick Drop Plug in with default shortcut key Ctrl + . This performs the same action on the complete block diagram or active selection. Use Ctrl + Shift + to enable or disable the conversion function highlight. (Controlled by the Boolean 'RemoveCoercionDots.Highlight' key in labview.ini)

Extract the zip file to your [LabVIEW Data] folder.

[UPDATE 13-Sept-2015]

- Now inserting one conversion function for multiple destinations of the same type

- Handling additianl functions where type depends on output and not connected terminal (Like Divide, BuildArray).

- Handling Enums and TypeDefs (not inserting when representation of source and destination matches).

- No more LV2013 support for Quick Drop Plugin (Wire:DisconnectTerminal method not available in LV2013).

- Disabling menu options when no conversion function available for coercion dot. (Shown below on TypeDef wire)

disabled.PNG


Download All
Comments
AristosQueue (NI)
NI Employee (retired)
on

I like the idea, but there's one bit of sophistication that it must have.

If you have a coercion dot on a numeric array, that indicates that LV has to do work to convert the array. If there's only one destination for your array, I generally don't worry about the coercion dot. But if there are two destinations, LV does double work, one for each terminal. So the coercion bullet needs to be added *at the common junction of the two*, not on each fork. If you add at each fork, you've saved nothing and except suppressed the valuable warning. So if there are 2 or more forks that are all the same type, you should create the bullet and then rewire to those terminals. Any other forks that re different types should get their own coercions.

KvZ
Active Participant
Active Participant
on

yes, that's the next step . The same thing occured to me but since it's my first time looking into scripting I decided to do the generic solution first instead of adding the an additional layer of complexity from the start.

Contributors