From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
altenbach
Knight of NI

The VI analyzer toolkit will do that for you. 😉

manu.NET
Active Participant

Hello ,

 

The top would be to have this feature directly in LabView ... without having to install one more toolkit.

 

Manu.

 

 

Manu.net
altenbach
Knight of NI

I agree. Easiest would be to show coercions as warnings. (ctrl+L...check "show warnings"). 🙂

ReneW
Member

I agree too.

Some times it is a little bit annoying to replace the "Coercion dots" through the corresponding conversion function manually. I think LabVIEW should support the insertion of the corresponding conversion function a little bit more. Therefore I have posted an additional idea under Replace "Coercion dots" through corresponding conversion function supported by LabVIEW .

 

(Note: I was not sure which is the best way to create a link to another idea. I linked to the Permalink of my idea.)

stbe
Active Participant

Kudos for ctrl+L...check "show warnings"

_________________________
CLA
SeanJ
Active Participant

Hi Altenbach,

 

If I use VI analyzer to chekc for cercion dots, it tells me:

 

This diagram contains 28 coercion dots, which is more than the user-specified maximum (10).

 

But it doesn't highlight them individually, one at a time.  It just opens the VI where the dots appear.

 

Am I missing soemthing?

yenknip
Active Participant

Just spent nearly 2 hours bug hunting someone else's code. It would probably have saved me most of that time if I could have searched through coercions dots in the warnings list

_____________________________
- Cheers, Ed
N2CU
Member

I also would like to see a search function for this. Over the years this has plagued me, especially when trying to debug someone else's code. The biggest issue I have is that with enumerated controls, of which I use a ton of, and any constants created from them will not function properly if you have created a constant and then add or subtract an item in the control. The constant is no longer valid. You have to delete it and then re-create with the same value. I realize I can make a type def out of each control but even that does not work 100% according to my co-worker who has used that method.

 

Being able to search for and list all coercion dots, if not automatically fixing them, would be great.

 

Ditto previous comments on the VI Analyzer Toolkit Smiley Sad

ouadji
Trusted Enthusiast

@altenbach :

The top would be to have this feature directly in LabView ... without having to install one more toolkit.

 

200% agree with him.

X.
Trusted Enthusiast
Trusted Enthusiast

From the Analyzer toolkit "sales" page:

 

Included in LabVIEW Professional Development System