LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make LabVIEW display data type warnings?

My application has math (multiplying and dividing by scalars) that currently starts with doubles but must result in unsigned long integers. It would make debugging significantly easier if LabVIEW would throw a warning whenever an int overflows, a value is assigned to a data type for which it is out of range, or a value is concatenated. Is there any way to make it do this?
0 Kudos
Message 1 of 2
(2,538 Views)
"...if LabVIEW would throw a warning whenever an int overflows, a value is assigned to a data type for which it is out of range, ..."

I hope you are not sugesting that LV stop and display an error when an over-flow occurs. This would break a lot of code where it does not matter.

Here are somthings that can be done to draw your attention to where LV is making some guess about what data type should be used.

1) Under Tools >>> Options >>> Colors,
you can un-check "use default colors" and define your coercion dot colors as something that gets your attention.

2) Under Tools >>>> Options >>> Debugging,
you can select "show warnings in ..." to include warnings with the error list. It will cause a new icon to appear next to your run arrow if an
y warnings are found.

3) If you have the VI Analyzer add-on, you can configure the tests as shown if figure 1 (attached) and you will get a test failure that you double-click on and investigate as shown in figure 2.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 2 of 2
(2,538 Views)