09-14-2011 10:25 AM
I have two things that I keep coming up across in VI Analyzer:
1. Is there anyway to set the default VI analyzer configuration so that it applies to all of the projects I work on?
I have tried creating a task for project A, saving the configuration and then attempting to open that file in Project B, but it said that the file could not be loaded. The reason behind my question is that there are some default options that just add errors that we dont care about (e.g Dialog controls on the front panel - 99% of the LabVIEW code we're working on is called from TestStand as code modules, so the front panel doesnt really matter)
2. Can I mark / flag certain VIs as "safe" for analyzer tests?
Basically, certain VIs may fail some VI analyzer tests in a perfectly safe way (e.g. non-stanard error handling on a "close" VI, that does not have an error case structure so that the device always gets closed). I would love to have a way to mark the VI so that VI Analyzer would skip this particular test. This would enable me to have a rule that says something like "before any build, run the VI analyzer configuraton file, and ensure that there are no errors", as opposed to "run VI Analyzer and review any errors, decide if they're important or not for the VI in question...". A extension to this question would be how to run a VI Analyzer task before build when the VI Analyzer VIs do not accept cfg files for Project based tasks.
Any help would be greately appriciated!
Thanks,
Shaun
Solved! Go to Solution.
09-14-2011 10:51 AM
1. A project-based .cfg file cannot be ported between projects. Could you perhaps create a non-project-based .cfg file (by virtue of the "Start New Task" option on the first page of the VI Analyzer) and use that? It wouldn't have any files in the list, but it would have all the tests configured the way you want. And you could start with that .cfg file on your different projects...you would just have to add VIs to it on a folder basis (on page 2 of the VI Analyzer), as opposed to having them all added for you in a project-based .cfg.
2. On page 4 of the VI Analyzer, you can exclude certain tests from running on certain VIs, and save those settings in a .cfg. This option is also exposed in the VI Analyzer API with VIAn Exclude Tests from VI.vi.
09-14-2011 11:01 AM
Thanks darren - that looks like a good way to go forward 🙂
Now that I have you're attention, there was another VI analyzer thing I was working on... I was trying to create a test to ensure that all public VIs of my libraries are reentrant (we use TestStand & mutli-slot testing alot). The test itself works, but on the built in tests I can double click on the warning and get taken to the VI in question. Is there anyway to achieve this with custom tests? (I've attached my public VI test for reference). Also, am I right in presuming that if one of my coworkers were to copy and paste this LLB into their VI Analyzer Tests folder, it would "just work"?
09-14-2011 11:10 AM
To get object highlighting to work, you need to configure the Reconstruct Data (RD) VI of the test. Check out the "Configuring the Test to Highlight Failures" section of the Designing a Custom VI Analyzer Test help topic for more information. In your case, you'll want to configure the RD VI for a Traverse Target of "Other" and a Class of "Panel"...don't forget to Save Current Values as Default before saving and closing the RD VI.
And yes, once the test is working, your coworker can place the test LLB in either the [LabVIEW]\project\_VI Analyzer\_tests folder or the [LabVIEW Data]\VI Analyzer Tests folder, and it should "just work", assuming his LabVIEW version is equal to or greater than the version in which you saved the test VIs.