LabVIEW VI Analyzer Toolkit

Similar documents
LabVIEW VI Analyzer Toolkit

LabVIEW Express VI Development Toolkit User Guide

Getting Started with the LabVIEW Datalogging and Supervisory Control Module

Getting Started with the LabVIEW Real-Time Module

LabVIEW FPGA Module Release Notes

LabVIEW FPGA Module Release and Upgrade Notes

LabVIEW Datalogging and Supervisory Control Module

Lesson 4 Implementing a VI

LabVIEW Real-Time Module Release and Upgrade Notes

Getting Started with the LabVIEW Datalogging and Supervisory Control Module

Hardware: Acquiring Data and Communicating with Instruments

Getting Results with CompactRIO and LabVIEW

Learn the three palettes. Learn how data is passed in LabVIEW. Create a subvi using two different methods.

LabVIEW for FTC Release Notes

LabVIEW Real-Time Module for Mac OS X User Manual Addendum

A. Front Panel Design Lesson 4 Implementing a VI

Getting Started with LabVIEW Virtual Instruments

IMAQ Vision Deployment Engine Note to Users

IMAQ Vision Deployment Engine Note to Users

NI-Industrial Communications for EtherCAT

LabVIEW FPGA Module Release and Upgrade Notes

LabVIEW Datalogging and Supervisory Control Module

Virtual Instrumentation With LabVIEW

Getting Started with the LabVIEW Real-Time Module

Table 1. Inputs and Outputs

Programming for the LabVIEW Real-Time Module Using LabWindows/CVI

Getting Started with the LabVIEW Robotics Module Version 2011

LabVIEW DataFinder Toolkit

Lesson 1 Introduction to LabVIEW. TOPICS LabVIEW Environment Front Panel Block Diagram Dataflow Programming LabVIEW Help and Manuals Debugging a VI

LabVIEW Datalogging and Supervisory Control Module

Virtual Instrumentation With LabVIEW

Certified LabVIEW Associate Developer Exam. Test Booklet

System Overview and Terms

Using Desktop PCs as RT Targets with the LabVIEW Real-Time Module

EKT 314/4 LABORATORIES SHEET

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis

LabWindows /CVI Version 2017

Concept: Debugging. Goal. Description. Implementation. Use the debugging tools built into LabVIEW.

LabVIEW PDA Module Release Notes

Introduction to LabVIEW

Exercise 0 - Open and Run a Virtual Instrument (Slide 12)

LabWindows /CVI Release Notes

LabVIEW Real-Time Module Release Notes

LabWindows /CVI Release Notes Version 2009

OpenStax-CNX module: m Thermometer VI * National Instruments

LabWindows /CVI Release Notes Version 8.0.1

Getting Started with the LabWindows /CVI Real-Time Module

Certified LabVIEW Associate Developer Examination

The LabVIEW Programming Environment and Basic Operations

Read Temperature Data

LabVIEW Upgrade Notes

INSTALLATION INSTRUCTIONS Data Management Software Suite in the Evaluation Mode

LabVIEW 2018 Upgrade Notes

Certified LabVIEW Associate Developer Examination

LabVIEW Application Builder User Guide

NI-IMAQ VI Reference Help

NI TestStand ATML Toolkit Version 2013

Legal Notes. Regarding Trademarks KYOCERA MITA Corporation

MATRIXx. Platforms, Requirements, and Deliverables RELEASE NOTES. Version 7.1. Documentation

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis

Quick Start Guide. ARIS Architect. Version 9.8 Service Release 2

LabVIEW DSP Module Release and Upgrade Notes

LabVIEW FPGA Module Version 2013

Release Notes. LabVIEW Application Builder for Macintosh. Contents

C Support for myrio 5.0 User Guide

INSTALLATION INSTRUCTIONS Data Management Software Suite

Lab 4 - Data Acquisition

NI TestStand ATML Toolkit

IMAQ Vision 7 Development Module for LabVIEW Release Notes

Where to Start with NI ELVIS

LabWindows /CVI Release Notes Version 9.0

CLAD Sample Exam 03. C. A control that output a cluster of the controls / indicators on the tabs.

LabVIEW Real-Time Module Release and Upgrade Notes

LabWindows /CVI Release Notes Version 2010

Step-by-Step Data Acquisition Part II Exercise 2: Generating an Analog Output Waveform

PHYC 500: Introduction to LabView. Exercise 1 (v 1.3) M.P. Hasselbeck, University of New Mexico

LabView instrumentoinnissa, 55492, 3op Labview in instrumentation

LabVIEW TM Basics I Introduction Course Manual

NI VeriStand Model Framework

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

Contents. Getting Started. RELEASE NOTES TestStand ATML Toolkit Version 2017

Ektron Advanced. Learning Objectives. Getting Started

NI-DAQ mx Base 1.x. Contents GETTING STARTED GUIDE

Where to Start with NI ELVIS

LabVIEW TM Core 1 Course Manual

Oracle General Navigation Overview

Bitter, Rick et al "LabVIEW Features" LabVIEW Advanced Programming Techinques Boca Raton: CRC Press LLC,2001

Web Manager 2.0 User s Manual Table of Contents

Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES

Lab 1: Getting familiar with LabVIEW: Part I

Quick Start Guide. ARIS Architect. Version 9.7

23 - Report & Export

LabVIEW Microprocessor SDK Release Notes Version 2009

KYOCERA Net Viewer User Guide

Using Styles In Microsoft Word 2002

Using Outlook Web Access (OWA) for Employees

Getting Results with the NI PXI-6585R

Creating Interactive PDF Forms

SAS Web Report Studio 3.1

LabVIEW. Embedded Development Module Target Distribution Guide. Target Distribution Guide. July A-01

Transcription:

USER GUIDE LabVIEW VI Analyzer Toolkit Version 1.1 Contents The LabVIEW VI Analyzer Toolkit allows you to interactively and programmatically test VIs to find areas of improvement. The toolkit contains more than 60 tests that address a wide range of performance and style issues. The toolkit organizes the tests into the following main categories: Block Diagram Checks block diagram performance and style issues, such as wiring, loop and structure usage, coercion dots, and unnecessary elements on the block diagram. Documentation Checks for documentation within a VI for developers and users, such as VI and control descriptions and block diagram comments, and checks the spelling on VIs, front panels, and block diagrams. Front Panel Checks front panel design and user interface issues, such as control usage, font selection, and labels. General Checks performance and style issues that do not fit into the other three categories, such as file properties, icons and connector panes, and VI properties. This user guide provides a step-by-step introduction of the process of creating, configuring, and running a simple VI Analyzer task and using the VI Analyzer to interpret the results. The user guide also shows you how to export test results, save task configuration settings so you can run and re-run tasks quickly, and create tools for analyzing VIs programmatically. About the VI Analyzer Toolkit... 2 Upgrading from Version 1.0... 3 Using the VI Analyzer... 4 Creating and Configuring a VI Analyzer Task... 4 Viewing VI Analyzer Results... 7

About the VI Analyzer Toolkit Exporting VI Analyzer Results...9 Loading VI Analyzer Configuration Files...10 Customizing Tests within VI Analyzer Tasks...10 Using the VI Analyzer VIs...13 Automating VI Analyzer Tasks...14 Where to Go from Here...15 You can use the VI Analyzer Toolkit to create and configure VI Analyzer tasks, which provide the settings for the VI Analyzer to run tests that evaluate style and efficiency of VIs. National Instruments recommends you adhere to the style guidelines that the tests promote to achieve maximum performance and reliability. However, you can customize the test criteria to analyze whether VIs comply with standards specific to your needs. The VI Analyzer Toolkit runs tests on standard VIs, polymorphic VIs, separate components of Express VIs (source VIs and configuration dialog box VIs), VI templates, global variables, and custom controls. You can run tests on all VIs in a specific folder, LLB, or on a single VI. You cannot run tests directly on LabVIEW project files or project libraries, but you can run tests on any VIs that are part of a project library or within the project file. The VIs on which you perform tests do not have to be saved in the latest version of LabVIEW. You can perform tests on any VIs that you can open in the latest version of LabVIEW. You can specify which tests you want to run on specific VIs. Not all VI Analyzer tests are relevant to every VI you include in a VI Analyzer task. For example, you might not run front panel tests related to fonts on subvis where users do not see the front panels. You can save the settings you configure for a VI Analyzer task in a configuration file (.cfg), which you can apply to subsequent VI Analyzer tasks. The configuration file serves as a template for testing VIs on a regular basis to meet specific criteria. The VI Analyzer Toolkit provides two options for creating, configuring, and running VI Analyzer tasks. You can use the VI Analyzer by selecting Tools»VI Analyzer»Analyze VIs to interactively select the settings you want for a particular analysis. You also can use the VI Analyzer VIs that the toolkit installs on the Functions palette, which allow you to write programs to perform VI Analyzer tasks programmatically. LabVIEW VI Analyzer Toolkit User Guide 2 ni.com

Upgrading from Version 1.0 After the VI Analyzer runs a task, you can use the VI Analyzer Results Window to highlight objects that caused test failures in specific VIs. You can export the results into an ASCII- or HTML-formatted report that contains all pertinent information about the analysis, including tests that fail and errors that occur during the analysis. The VI Analyzer Toolkit 1.1 contains the following changes from version 1.0: Several new tests have been added: A Spell Check test with the ability to spell check VIs, front panels, and block diagrams. The Wired Terminals in Subdiagrams test, which checks to see if any control or indicator that is wired on the connector pane does not reside within the top-level block diagram. A Control Terminal Label Visible test, which checks if labels of block diagram control terminals are visible. The Built Application Compatibility test, which checks for properties or methods that are not supported in built applications. Overall faster analysis performance. You can no longer analyze all the subvis of a VI. A quick launch template is now available to run common analyzer tasks from the Tools menu. Place your quick launch VIs in the \project\vi Analyzer\Quick Launch folder. You can now launch this task by navigating to Tools»VI Analyzer»Quick Launch. The VIAn Easy Analyze VI now can analyze a VI, LLB, or folder. You can display the VI Analyzer Results Window programmatically in the VIAn Run VI by using the Show Results Window? input. Using the VIAn Exclude Tests from VI, you can exclude specific tests from VIs in a VI Analyzer task using the VI. You can programmatically select/deselect tests using the VIAn Select Tests VI. You can programmatically monitor analysis progress using the VIAn Get Analysis Status VI. The VIAn Set SubVI Exclusion Paths, VIAn Get SubVI Exclusion Paths, and VIAn Modify Item SubVIs VIs no longer perform any functions. National Instruments Corporation 3 LabVIEW VI Analyzer Toolkit User Guide

Using the VI Analyzer The VI Analyzer is a user interface that guides you through the process of creating and configuring a VI Analyzer task. Creating and Configuring a VI Analyzer Task Complete the following steps to examine VIs using the VI Analyzer. 1. From the Tools menu, select VI Analyzer»Analyze VIs. 2. In the Select Task dialog box, select the Start a new VI Analyzer task option and click the Next button. 3. In the Select VIs dialog box, click the Add Top-level Item button. Navigate to and select labview\examples\vianalyzer\ llbtoanalyze.llb. Tip To select an LLB from a file dialog box, double-click the LLB filename to open it. In the LLB file dialog box, double-click the VI folder icon with a single dot next to it. After you select the LLB, it appears in the Items to Analyze hierarchy. 4. Expand the folder in the Items to Analyze hierarchy to display a list of all VIs, as shown in the following dialog box. LabVIEW VI Analyzer Toolkit User Guide 4 ni.com

Notice the Include/Exclude Items button, which you can use to select or remove the exact VIs you want in or removed from a VI Analyzer task. Select a VI in the Items to Analyze hierarchy to make the button active. Refer to the Customizing Tests within VI Analyzer Tasks section for more information about including and excluding VIs from VI Analyzer tasks. 5. Click the Next button. The Select Tests dialog box appears. The Select Tests dialog box allows you to select the tests you want to run. The VI Analyzer groups tests by category. For certain tests, you can configure settings to define specific criteria for passing or failing the test. You can expand items in the Tests hierarchy to see all available VI Analyzer tests, as shown in the following dialog box. National Instruments Corporation 5 LabVIEW VI Analyzer Toolkit User Guide

For this exercise, do not change the test selections in the Tests hierarchy. Note By default, the VI Analyzer selects all tests in the Tests hierarchy to run in a VI Analyzer task. 6. Click the Next button. The Exclude Tests from VIs dialog box appears. The Exclude Tests from VIs dialog box allows you to exclude specific tests for specific VIs. Refer to the Customizing Tests within VI Analyzer Tasks section for more information about including and excluding tests from VI Analyzer tasks. 7. Click the Save button. In the file dialog box, select the location where you want to save the configuration file. Name the file test1.cfg. After you save a configuration file, you can load it into the VI Analyzer to perform the same VI Analyzer task at a later time. Refer to the Loading VI Analyzer Configuration Files section for more information about using configuration files. LabVIEW VI Analyzer Toolkit User Guide 6 ni.com

Viewing VI Analyzer Results 8. You can assign a password to a configuration file if you want to prohibit other users from loading the file. In the Password Protect Configuration File? dialog box, do not change the default No option to disable password protection for the configuration file. Click the OK button. 9. Click the Analyze button. The Analyzing VIs dialog box displays the progress of the VI Analyzer task. The VI Analyzer Results Window, which appears after the analysis is complete, displays results in three tabbed pages. The window allows you to view and organize results from a number of tests run on a number of VIs. Complete the following steps to view VI Analyzer results. 1. On the Test Results page, click the Sort by Test option to view the results by test. The Results List hierarchy displays the high-ranking tests first, marked with a red exclamation point, and displays the low-ranking tests last, marked with a blue i. The VI Analyzer Results Window includes a legend for the test ranking icons, shown at left. High-ranking tests involve issues that have a significant impact on VI performance. Low-ranking tests involve minor style or cosmetic issues that do not significantly affect VI performance. Tests that do not have a ranking icon next to them fall into a middle-ranking area. The default ranking for each test matches National Instruments recommendations for style and performance issues. 2. Expand the Duplicate Control Labels item to view a list of VIs that failed the test. Tip By default, the Test Results page lists only the failed tests. Remove the checkmark from the Show Failures Only checkbox if you want to view details for all tests in the VI Analyzer task. 3. Expand the Gen set disabled state.vi item to view a list of test failure occurrences for the VI. Tip You can see the number of tests that failed in each category in the subitems column of the Results Window without expanding the failed VI or failed test node. National Instruments Corporation 7 LabVIEW VI Analyzer Toolkit User Guide

4. Click the Occurrence 1 item. Notice the text in the Description text box that describes why the VI failed the test, as shown in the following example. The VI failed the test because multiple controls on the front panel have the same label. 5. Double-click the Occurrence 1 item. The front panel of the Gen set disabled state VI opens and the VI Analyzer highlights one of the controls that contains a duplicate label. You can correct the label so the VI passes the test the next time you run the VI Analyzer task. 6. Close the Gen set disabled state VI. LabVIEW VI Analyzer Toolkit User Guide 8 ni.com

Exporting VI Analyzer Results 7. Click the Testing Errors tab of the VI Analyzer Results Window. If errors occur during the analysis, the Testing Errors page displays a list of VIs and tests that did not load, tests that did not run, and tests in which errors occurred. For example, if you attempt to run tests on a password-protected VI and do not provide a password, the Errors List hierarchy displays a Test Error Out error and the Error Description text box displays the reason. For this exercise, the Testing Errors tab does not list any tests because no errors occurred. 8. Click the Summary tab of the VI Analyzer Results Window. The Summary page displays several types of summary results from the analysis, such as the number of tests that ran, the number that passed/failed, and the time it took to complete the VI Analyzer task. From the VI Analyzer Results Window, complete the following steps to create a file of the results in a format you can open and manipulate in other applications. 1. Click the Export button. The Export VI Analyzer Results dialog box appears. 2. Enter the path and filename for the results file in the Export File Path control. The default is a filename consisting of the current date and time, located in the LabVIEW 8.0 directory. 3. From the Export Type list, select the file format you want. You can export the results either as a tab-delimited ASCII file, which is useful with spreadsheet applications, or as an HTML file, which is useful for viewing in Web browsers. 4. From the Sort by list, select whether you want the results in the file sorted by VI name or by test name. 5. Place checkmarks in the checkboxes next to the results you want to include in the exported file. By default, the Summary Data, Failed Tests, and Errors checkboxes contain checkmarks. 6. Click the Export button to generate the file. 7. In the VI Analyzer Results Window, click the Done button to close the window. 8. Click the Yes button to save the results in a VI Analyzer results file (.rsl) that you can view later in the VI Analyzer Results Window. A file dialog box appears. Select the path and filename you want for the results file. National Instruments Corporation 9 LabVIEW VI Analyzer Toolkit User Guide

Note You also can click the Save button in the VI Analyzer Results Window to create results files. To view previously saved results files in the VI Analyzer Results Window, select Tools»VI Analyzer»Show Results Window. If the VI Analyzer Results Window is already open, click the Load button. You can view only VI Analyzer results files in the VI Analyzer Results Window. 9. Click the No button to close the VI Analyzer. Loading VI Analyzer Configuration Files You can create and edit VI Analyzer configuration files that contain the settings you selected for a VI Analyzer task. Complete the following steps to load a configuration file into the VI Analyzer. 1. Open the VI Analyzer. In the Select Task dialog box, select the Load a previously saved analysis configuration file option and click the Next button. 2. From the file dialog, navigate to the test1.cfg file you created previously. Double-click the filename to select it. 3. In the Select VIs dialog box, notice that the settings for VIs and folders in the Items to Analyze hierarchy are the ones you selected previously. 4. Select the Container VI in the Items to Analyze hierarchy and click the Include/Exclude Items button. The X next to the VI indicates that the VI Analyzer task does not include the VI. 5. Click the Next button. The Select Tests dialog box appears. In the next section, you will use the Select Tests dialog box to customize tests in the VI Analyzer task. Tip The VI Analyzer Toolkit includes several example configuration files you can use as models when creating configuration files. The example files are located in the examples\vianalyzer directory. Customizing Tests within VI Analyzer Tasks Many of the tests included with the VI Analyzer allow you to set certain criteria for passing or failing the tests. Tip You can set test criteria the way you want, then save the configuration file without specifying VIs in the Select VIs dialog box. You can use this configuration file to run the same set of tests on different groups of VIs. LabVIEW VI Analyzer Toolkit User Guide 10 ni.com

Complete the following steps to configure the test criteria for a VI Analyzer task. 1. From the Select Tests dialog box, expand the Block Diagram category in the Tests hierarchy. Expand the Performance category to display the specific tests for the category. 2. Click the Arrays and Strings in Loops test. The configuration options for the test appear in the Selected Test s Configuration frame on the right, as shown in the following dialog box. 3. Select While Loop from the Loops control. The test now searches only for instances containing While Loops. 4. Select High from the Test Ranking control. The test now receives a high rank and will appear at the top of the Test Results hierarchy in the VI Analyzer Results Window. 5. Click the Next button. The Exclude Tests from VIs dialog box appears. National Instruments Corporation 11 LabVIEW VI Analyzer Toolkit User Guide

The Exclude Tests from VIs dialog box allows you to skip specific tests for specific VIs. In some cases, a test might not be necessary for a certain type of VI. 6. Select the Gen align horizontal VI and remove the checkmark from the checkbox next to the Icon Size and Border test located in the General»Icon and Connector Pane category. Select the Gen align vertical VI and remove the same test, as shown in the following dialog box. Tip Press the <Ctrl> key and click the VI names to select multiple VIs at once if you want to exclude the same tests for more than one VI. The Gen align horizontal VI and the Gen align vertical VI are internal subvis that users do not see, so the icon specifications are not important. Therefore, running the Icon Size and Border test on the VIs is not necessary. 7. Click the Save button. Save the file as test2.cfg. LabVIEW VI Analyzer Toolkit User Guide 12 ni.com

Using the VI Analyzer VIs 8. Click the Analyze button to run an analysis with the new settings. 9. In the VI Analyzer Results Window, review the results of the analysis. Notice the results for the Icon Size and Border test if you sort by test or the Gen align horizontal VI and the Gen align vertical VI if you sort by VI. The VI Analyzer palette contains VIs that you can use to programmatically create or run VI Analyzer tasks. The programmatic option provides flexibility when you need to check programs frequently or regularly. VI Analyzer VI names begin with VIAn to identify them as part of the VI Analyzer Toolkit. The VIAn Easy Analyze and VIAn Easy Report VIs allow you to create a basic VI Analyzer task quickly. Other VI Analyzer VIs require familiarity with the analysis process and with LabVIEW programming. The VIAn Easy Analyze VI, shown at left, uses a previously saved VI Analyzer configuration file to run an analysis. The configuration file contains the path to the VIs to include in the analysis as well as the specific tests to run. You also can wire a folder, LLB, or VI path if you want to run the analysis with the default settings. The VI returns the test results in a single cluster. The VIAn Easy Report VI, shown at left, converts the analysis results from the VIAn Easy Analyze VI into a report. You can specify whether the report is in ASCII or HTML format, which results to include, and where the VI saves the report file. Use the NI Example Finder to open the Easy VI Analysis VI. Select Help»Find Examples and select the Directory Structure view. Open the VIAnalyzer folder to find the Easy VI Analysis VI. This example VI runs a VI Analyzer task and generates an HTML-based report with the results. National Instruments Corporation 13 LabVIEW VI Analyzer Toolkit User Guide

Open the block diagram. Notice that the example VI includes subvis such as the VIAn Easy Analyze VI and the VIAn Easy Report VI, as shown in the following block diagram.. Run the Easy VI Analysis VI. After the example VI runs, front panel indicators display the percentage of tests passed and failed and the total analysis time. A Web browser opens to display the HTML-based report. Compare the report to the one you created in the Exporting VI Analyzer Results section. You can use the Easy VI Analysis VI as a model when you create VIs using the VI Analyzer VIs. Refer to the LabVIEW Help for more information about specific VI Analyzer VIs. Automating VI Analyzer Tasks You can use the VI Analyzer VIs to create a program that dynamically creates and modifies a VI Analyzer task. Use the NI Example Finder to open the Advanced VI Analysis VI. Select Help»Find Examples and select the Directory Structure view. Open the VIAnalyzer folder to find the Advanced VI Analysis VI. This example VI allows you to exclude specific VIs and specific tests from a VI Analyzer task. LabVIEW VI Analyzer Toolkit User Guide 14 ni.com

Open the block diagram. SubVIs in the example VI include a number of VI Analyzer VIs you can use to perform a VI Analyzer task, generate an HTML report, and provide a list of the VIs analyzed and tests run in the VI Analyzer task. The following block diagram shows some of the VI Analyzer VIs on the Advanced VI Analysis VI block diagram. The block diagram is very wide and includes VIs and objects not visible in the following illustration. The VIAn Modify Test Settings VI excludes certain tests from the analysis. The VIAn Modify Test Config Value VI deselects the Control Descriptions option in the VI Documentation test. You can use the front panel controls to change the criteria that these VIs set. Where to Go from Here Run the Advanced VI Analysis VI. After the example VI runs, front panel indicators display lists of the VIs and tests that the VI Analyzer task included. A Web browser opens to display the HTML-based report. You can use the Advanced VI Analysis VI as a model when you create VIs for detailed VI Analyzer tasks. Refer to the LabVIEW Help for more information about specific VI Analyzer VIs. The LabVIEW Help includes procedures for using the VI Analyzer Toolkit as well as VI reference help and information on VI style guidelines. Access the LabVIEW Help by selecting Help»Search the LabVIEW Help. Double-click the Toolsets book in the Contents tab to access help on the VI Analyzer Toolkit. National Instruments Corporation 15 LabVIEW VI Analyzer Toolkit User Guide

National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your CD, or ni.com/patents. 2003 2005 National Instruments Corporation. All rights reserved. 373631B-01 Oct05