Command-Line Graphical Differencing of VIs

Publish Date: Nov 28, 2018 | 5 Ratings | 1.60 out of 5 | Print | 1 Customer Review | Submit your review

Overview

Software development benefits from the ability to track changes to source code. Graphical differencing makes this possible by enabling developers to see exactly what changes were made between different versions of VIs, which is an important part of code reviews and helps focus software validation efforts. This functionality is now available from the command-line prompt in the LabVIEW 2009 Professional Development System to facilitate better integration with source code control (SCC) providers.

1. Source Code Differencing

Graphical differencing shows a visual comparison of two VIs and specifically highlights and lists everything that is different between them.  The example below has highlighted objects on the block diagram that have been moved outside of a case structure.  The lower window shows the comprehensive list and checks off all of the items that have been examined, which is beneficial for code reviews.

Figure 1: Graphical differencing highlights and lists everything that has been modified between different versions of VIs.

This feature can be invoked in one of three ways:

  1. From within LabVIEW, select Tools » Compare » Compare VIs. - this requires that the developer have copies of the files to compare saved on disk.
  2. With integration with SCC turned on, select Tools » Show Differences. - this requires that a developer be using the SCC integration with the LabVIEW ADE.
  3. From the command-line - the differencing engine can be invoked by calling LVCompare.exe from the command line and passing it the location of the files.

The third option enables SCC providers to override default, text-based editors so that differencing can be performed outside of the LabVIEW development environment.  Consult your SCC provider for information on how to override the default text-based comparison tool.

Use the following syntax to configure any arguments that LVCompare.exe needs.
lvcompare.exe <absolute path to VI 1> <absolute path to VI 2> [-lvpath <path to LabVIEW>][-noattr][-nofp][-nofppos][-nobd][-nobdcosm][-nobdpos]

As an example, if you have this configured with TortoiseSVN, you can simply right click on the file in the Windows Explorer and select 'Diff' to launch the comparison utility.

Figure 2: The TortoiseSVN Client for Subversion can invoke graphical differencing with the command-line interface in LabVIEW 2009 or later.

Back to Top

2. Related Resources

See additional features in LabVIEW 2009 at ni.com/labview/whatsnew/features

Lear more about configuration management guidelines for LabVIEW 

Back to Top

Customer Reviews
1 Review | Submit your review

Add Return Code  - Jun 25, 2011

Am using LVCompare.exe to compare project with 1000 VIs. Would be very helpful if executable returned code with 0 = no differences found, 1 = differences. Otherwise user needs to "do it manually", a big pain.

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit