You can reconcile different sets of changes to the same VI with the merge VIs functionality in LabVIEW.

Note Merging VIs requires LabVIEW Professional edition.

LabVIEW uses a three-way merge to merge VIs. A three-way merge reconciles two diverging sets of changes by comparing each set to the same original code. The VI merge capability in LabVIEW uses the following terms:

  • Base VI—The most recent common ancestor of the VIs that you want to merge. This VI is usually a version of the VI under source control.
  • Your VI—The local working copy of the VI that you are developing. Includes the changes that you want to introduce.
  • Their VI—The incoming changes to the common ancestor that you need to reconcile with your own changes.

    For example, another user might have made changes to the same VI and checked these changes into source control before you submitted your own changes. In this case, you need to reconcile your own changes with the changes the other user made to the same starting point VI.

  • Note To merge changes from Their VI with changes from Your VI, there must be a common intersection in Base VI.

    For example, assume Their VI and Your VI include a tunnel. To merge the VIs, a tunnel must also exist in Base VI so that LabVIEW knows that the matching tunnels in Their VI and Your VI also match each other.

    Use the Select VIs to Merge dialog box to automatically or interactively resolve differences between the original (base) VI and two diverging revisions of that original VI. If differences between the two VIs conflict, you can interactively resolve the changes using the Merge VIs dialog box.

    To automatically or interactively merge two VIs, complete the following steps.

    1. Rename the VIs that you want to merge.

      LabVIEW cannot load two VIs with the same name.

    2. Select Tools » Merge » Merge VIs.
      The Select VIs to Merge dialog box appears.
    3. Click Browse next to Base VI, navigate to the original VI, and click OK.
    4. Click Browse next to Your VI, navigate to the VI with your own changes, and click OK.
    5. Click Browse next to Their VI, navigate to the VI with the other user's changes, and click OK.
    6. Optional: Select options from the Merge options section to configure how LabVIEW merges elements of the VIs.

      View the context help (Help » Show Context Help or Ctrl+H) to display rollover help for each option.

    7. Click Merge.
      The Merge front panels window, Merge block diagrams window, a merged VI, and the Merge VIs dialog box appear.
    8. To view the details of a specific change, click the expand/contract symbol next to the change.

      By default, LabVIEW collapses each change in the Unresolved conflicting change(s) field.

    9. For each change, select the detail of either Your VI or Their VI by clicking the description of the change under the Yours or Theirs subcategories.
      Note Most changes are circled in red on either the Front panel changes window, the Block diagram changes window, or in the untitled merged VI.
      LabVIEW puts an X next to each unresolved change.
    10. To select the change you want to accept and add to the merged VI, click the Choose Base, Choose Theirs, or Choose Yours button.
      As you resolve each change, a checkmark appears next to the change.
    11. After you resolve all changes:
      1. Click the Close button to close the Merge VIs dialog box.
      2. Click the Save button to save the merged VI.

    You also can configure a third-party source control provider to use LVMerge.exe as the default merge application. LVMerge.exe is equivalent to the Select VIs to Merge dialog box.

    To merge LLBs, you can use the Select LLBs to Merge dialog box to automatically or interactively resolve differences between different versions of an LLB.