LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
manu.NET

Find "Coercion dots" in LabVIEW project

Status: New

 

The "Coerce dots" are handled by LabVIEW as Visual warnings ... but a bad type coercion could have very bad issues ! Smiley Mad

 

It should be nice to be able to find all "Coerce dots" in all the VI's of a project, in order to check if they are critical or not.

 

[admin edit] This functionality is currently available with the VI Analyzer Toolkit (included with a LabVIEW Professional license or available for separate purchase). Specifically, you can run the Block Diagram > Performance > Coercion Dots test with the 'Block Diagram' option turned off, and the 'Single Wire' option turned on with a 'Maximum Number' of 0:
coerc.png

If you run the test with this configuration, it will return a failure for every coercion dot in the analyzed code.

Note: The idea will remain open, but we're mentioning the workaround here for the benefit of users who need this functionality today and find this Idea Exchange post via search.

 

Manu.net
15 Comments
MGiacomet
Member

The original request is to ***FIND*** the coersion dots.

 

VI Analyzer COUNTS then, but would be VERY useful (and what the original poster is asking for is) to not have to page through every single case, event structure, etc. looking for the dots...

cgibson
Member

I came here after trying to search on how to find coercion dots. In my case I am trying to track down instances of a control that has been changed to a type-def. The coercion dot won't get me 100%, but it would beat inspecting 100's of VIs.

cgibson
Member

So apparently you can use the VI Analyzer to locate coercion dots. You have to select the options in the analyzer correctly, but it works.

 

The way is described here:

https://forums.ni.com/t5/LabVIEW/Finding-coercion-dots/td-p/3734995

 

Basically the coercion test in VI Analyzer can look at the whole diagram, which is set by default, or individual wires. When you set it for wires you can double click the occurrences in the report and go straight to the coercion site.

 

You can also use VI Scripting to write something custom. This is a bit tricky because you have to take into account sub-diagrams. (Case structures have sub diagrams for each case with there own origin and set of objects. Other structures have these as well.)

 

I tried the VI Analyzer approach in LV 2009 SP1 and it worked great.

wiebe@CARYA
Knight of NI

You can traverse for wires or terminals, making the recursive diagrams a non-issue.

 

Although making a script "solves" the problem doesn't mean it isn't a good idea to have the feature build in.

cgibson
Member

I agree this would be a good feature. I kudo'd it.

 

The reason I added the comment about how to do it is because I needed to do it and found this thread while googling how. Once I found out, I came back here to leave a note for any future developers that may need that info.