LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Who uses the VI Analyzer?

I would like to know how people are using the VI Analyzer Toolkit to improve the style, performance, and robustness of their VIs. Do you use it more as a spot-checking utility for VIs as you write them, or have you utilized the programmatic interface to incorporate the VI Analyzer fully into your development process? What successes (or failures) have you had in doing so? Are there any tests that ship with the VI Analyzer that you have found particularly helpful, or are you finding holes in the test coverage?

For anyone who has not yet used the VI Analyzer, you should check out Mike Neal's VI Analyzer presentation, or better yet, try out the toolkit yourself with the LabVIEW Add-Ons Online Evaluation.

Thanks,
Darren N.
LabVIEW R&D
National Instruments
Message 1 of 43
(8,058 Views)
 
I have used it on and off as a way to improve my own code. It can (under the right conditions) spot issues with my favorite bug (i.e. bundle by name).
 
I have started to make this part of our process. I have been tasked with writing procedures for the proper introduction of re-use code into our in-house library. I intend on making the VI Analyzer part of the acceptance criteria. I have a template that enforces some of our corporate standards and is suitable for evaluating sub-VI's. I presented this template in a meeting two weeks ago. My intent is that re-used code should NEVER fail any tests.
 
I was planning on using different test configurations for different types of VI's but I have not gotten to far with that.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 43
(8,010 Views)

VI Analyzer

 

Description:

This diagram contains 11 write local variables, which is more than the user-specified maximum number (5).

 

Can I changed it (the user-specified maximum number >5), How do that? Where?

 

Sorry my English is poor.

 

帖子被jwdz在12-02-2005 09:47 PM时编辑过了

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
Message 3 of 43
(7,986 Views)

Hello,

You can configure the options on VI Analyzer tests on the "Select Tests" page of the VI Analyzer.  Navigate the "Tests" tree to the test you wish you configure (in your case, it would be Block Diagram > Warnings > Globals and Locals).  Once you select the test, any custom configuration options available for that test will appear in the "Selected Test's Configuration" section.  This page of the VI Analyzer is the best place to browse the tests and become familiar with all the different ways you can customize the tests for your purposes.

Let me know if you have any additional questions,

Darren

Message 4 of 43
(7,939 Views)
Hey Darren,

VI Analyzer impresses me... and I find I have no use for it whatsoever.

VI Analyzer does things with the code that just aren't possible to develop as an end user of LabVIEW (without dipping into the scripting nodes). As such, it can catch errors and define styles of coding that are beyond the range of the compiler.
At the same time, my company really doesn't care that much about the style being consistent. As long as it's readable, individual coders are allowed to follow their own styles. Having a relatively arbitrary standard that says how large front panels must be, etc. just doesn't fit into our way of coding. And, believe it or not, this works well for us.

I confess to a certain disappointment when I first encountered the VI Analyzer. Just trying it out, I searched in vain for features that might test the function of the VI, rather than just how it was laid out. Alas, there doesn't seem to be an NI tool that does that (that I have available to me :)).

So, I would like to know, does NI use VI Analyzer as a matter of policy? Joe Z.
0 Kudos
Message 5 of 43
(7,901 Views)
Hi Joe,
 
Thanks very much for the feedback.  It definitely sounds your development team would not find the stylistic checks provided by the VI Analyzer to be useful based on your current way of doing things.  However, the VI Analyzer can prove extremely useful as a debugging tool, and I'm guessing that your development team does have to debug VIs on occasion.  🙂 
 
Here's a scenario...imagine a very simple VI that uses the Increment function to add 1 to the value of a control and then sends the result to an indicator.  However, when you run the VI, the number does not increment.  A quick check of the wires shows that you accidentally wired the input wire of the Increment directly under the Increment's output terminal and straight to the indicator, such that it *looks* like you're wiring from the output of the function.  Now this scenario would be extremely easy to debug in this simple VI, but what if this wiring error was present somewhere within a very large application, and you had to spend hours debugging some incorrect behavior of your application only to discover this errant wire as the culprit?  There are actually two tests in the VI Analyzer that can very quickly discover this error...the Unused Code test would flag the Increment function as being unused (since its output wasn't wired), and the Wires Under Objects test would flag the input wire as going under the output terminal of the function. 
 
Here's another scenario...imagine another simple VI that takes an input array and multiplies it by some constant value to scale all the values in the array.  However, when you look at the VI Properties of the VI, it takes up over 8 MB of disk space!  The reason for this is that someone, at some point, accidentally chose the "Make Current Values Default" option on the VI, and there were a million values in the array output indicator when they did it.  Again, an easy situation to solve when looking at this simple VI, but not so easy if this problem existed in a large application.  And again, there are two VI Analyzer tests that would help you discover this error...the VI Size test (for obvious reasons), and the Array Default Values test (which will flag any array control/indicator that is wired to the connector pane and has a non-empty default value).  This is actually a real-life example...one of my colleagues used the VI Analyzer as part of a code review for another group internal to NI and discovered this very problem in one of their VIs they were going to ship in a LabVIEW toolkit.
 
I could go on and on here, but the point is that the VI Analyzer is much more than a style-checking tool, although many customers and internal NI groups have found it very useful in this regard.  I would say that for your average LabVIEW programmer, the debugging potential of the VI Analyzer is by far its most compelling feature.
 
As for your other question, you are correct that the VI Analyzer is an edit-time tool, and does not perform run-time analysis.  I agree with you that a run-time analysis tool for LabVIEW would definitely be useful.
 
Finally, you asked if NI uses the VI Analyzer as a matter of policy.  The answer is yes, we have several groups internal to NI that use the VI Analyzer.  Some groups use it informally as an aid with code reviews, while other groups have completely adopted it into their development and build processes.
 
I really appreciate your feedback.  Please let me know if you have any other questions or comments.
 
-D
Message 6 of 43
(7,883 Views)

Hi,Darren

I Know ,thank you!

jwdz

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 Kudos
Message 7 of 43
(7,872 Views)

The Block Diagram >>> Warnings >>> Bundling Duplicate Names

 

is a nice function. Why is it a "warning"?

Come to think of it, why is "hidded ANYTHING" just a warning.

 

I would also like to be able to specify exceptions to the rules.

 

I can not find it now but where is that setting that complins if I have a control or indicator in an action engine? It should be smart enough to recognize an action engine since it one of the most basic structures in LV.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 43
(7,854 Views)
I was routed to a "browser check" page which I failed again because of lack of bandwidth. Is there any other links for OFF-LINE Evaluation?
0 Kudos
Message 9 of 43
(7,199 Views)
Hi Jack,
 
There is currently no "off-line" evaluation of the VI Analyzer.  If you are unable to use the on-line evaluation, I think your best option would be to get a demo from your local sales representative.
 
Let me know if you have any other questions about the VI Analyzer.
 
-D
Message 10 of 43
(7,167 Views)