LVCompare

I've got a LabVIEW 7 project that has about 1000 VIs and controls, call it Lab Original.  I made a modification that involved changing about 100 VIs, adding some, removing some -- call it Lab New.  I now want to make a third version that combines some features of Original and New, but am not 100% certain which VIs have been changed, and which are essentially the same.  Everything is under Version Control (Tortoise SVN), so at least the files are easily kept organized.  However, I can't easily use Date/Time information to distinguish changed and identical files, nor can I use ordinary comparison tools as simply opening a file can often lead to a (trivial) binary change.
Fortunately, there's LVCompare.exe, which has the ability to compare two VIs, looking at differences in the Block Diagram without caring about the appearance, size, or position of the various objects.  This utility acts like a DOS command -- you call it from the Command Line and pass it parameters and switches -- it does the compare and gives you a three-window display of the two VIs and their differences (if any), similar to what you see if you use the LabVIEW Compare Tool.  But there are some caveats.
First, the two file arguments must be distinct.  There's a note that says if they are in different LabVIEW Projects, then the Project environments will be different, but I haven't figured out what this means nor how to use it (even with VIs that are truly in a LabVIEW Project).  I've "programmed around" this problem by changing the extension of one of the VIs to .tmpvi, calling LVCompare, and then renaming it back to .vi when I'm done.
I've "wrapped" the calls to LVCompare in a set of VIs that let me deal with the two folders holding the Lab Original and Lab New files (and folders).  I first split the set of files into "Files unique to Lab Original", "Files unique to Lab New", and "Files in both places".  Clearly I only need to run LVCompare on the latter.  I build the arguments needed for LVCompare, pass the files in, then wait for LVCompare to show me the differences.
The only remaining problem is that LVCompare doesn't "return" anything -- in particular, the only way to tell if two files are different is to actually look at the output of LVCompare!  What I'd really like to have is some form of output that can signal if the files are different or the same so that I can let the program crank through all of my files without having to use my own eyes as the indicator of a difference.
My initial trial of this system is certainly promising -- even though LVCompare can be a bit slow (a few seconds for each file), it (a) seems to work even on LabVIEW 7.0 files, (b) leaves the files that it is comparing intact, and (c) if there are files "missing" when it tries to open a VI, it simply plows ahead and does the comparison anyway after "giving up" on finding the files.
I have some ideas about how to trick LVCompare into telling me if there are differences or not.  If anyone has suggestions, they'd be most welcome.
Bob Schor

Hi, Bob,
Long time ago it was also necessary for me. Somewhere I have found one "undocumented" method, so it was possible to compare VIs "programmatically".
May be it helps for you as well. Disclaimer - use it at your own risk.
Andrey.
Attachments:
Differences Programmatically.vi ‏22 KB

Similar Messages

  • LVCompare Invoke Node Error

    I am trying to call LVCompare by inputting this into cmd:
    "C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" “C:\users\Temp\datalocation1\orange NEW.vi” “C:\users\Temp\datalocation2\orange.vi” –lvpath "C:\Program Files (x86)\National Instruments\LabVIEW 2011\LabVIEW.exe" –nobdcosm -nobdpos -nofppos
    But I receive an error message that says:
    "An error occurred while running LVCompare.
    Invoke Node in LVCompare.vi
    <APPEND>
    Method Name: <b>User Interaction:Compare VIs</b>"
    Has anyone else received this error? How do I fix this?
    Thank you!
    Amanda

    Seems you are using  LabVIEW Full Development system to run  LVCompare.exe.
    C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe will only work with a LabVIEW Professional Development system.
    in order to use it you will need to upgrade to the LabVIEW Professional Development system.
    Thank you & Best regards
    syrpimp
    =======================================================
    “You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley

  • LVcompare and Perforce

    Hello,
    I have a problem similar to this one, using LabVIEW and Perforce.
    My problem is slighly different. I use LabVIEW 2012 f5 and Perforce 2012.1
    I want to use LVCompare from LV environnement.
    The compare tool works well inside LV, when using two VIs with different names.
    My problem is that when I want to compare 2 versions of the same VI, using Perforce, LVCompare launches and everything is blocked. I have to kill tasks both for LVCompare and LabVIEW.
    Any suggestion for that problem ?
    with many thanks
    Philippe
    Pièces jointes :
    LV compare.png ‏77 KB

    HI Philippe,
    First of all, which LabVIEW Perforce clients are you using? The command line version ?
    Are you sure to call the LVCompare.exe within Perforce for diff and not another one ?
    Moreover these are steps you can use and check:
    1. Launch Perforce client (P4V ?) 
    2. Edit -> Preferences 
    3. Select the Diff tab 
    4. Click Add 
    o If you already had a tool (LVDiff) setup to diff VIs, select that entry and Click Edit 
    5. Enter this data in the pop-up dialog 
    o Extension: .vi 
    o Application: 
    § C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe (32bit) 
    § C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe (64bit) 
    o Argument: %1 %2 -nofp -nobdcosm -nobdpos 
    6. Save 
    7. Repeat for .ctl, .vit, and other LV file types 
    o NOTE1: Consider using the '-nofppos' option instead of the '-nofp' especially for .ctl's. Otherwise LV Compare will not show any differences for controls/typedefs. 
    o NOTE2: Do not add .lvproj, .lvlib or .lvclass to the list, as those files are XML files that LV Compare can not handle (as of LV 2012) and are simple to diff with text compare.
    These command line options listed above will: 
    · use the current LV version for the diff (since I did not list a LV version to use) 
    · does not compare the front panels (-nofp) 
    · does not compare front panel objects' position/size (-nofppos) 
    · does not compare the appearance of block diagram objects (-nobdcosm) 
    · does not compare size or position of lock diagram objects (-nobdpos) 
    See the full LV help for a complete list of all command line options.
    Hope it could help !
    Antonin G. Associated LabVIEW Developper
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Communauté francophone des développeurs LabVIEW et des enseignants en STI2D
    Si vous souhaitez partage...

  • Version control (lvcompare and lvmerge) for projects, classes and libs?

    Hi everyone
    Version control for classes, projects and libs (not just a plain .vi) - can it be done with lvcompare and lvmerge?
    I've tried a simple "LVCompare.exe project1.lvproj project2.lvproj" and it only returns an error (lvcompare.exe vi1.vi vi2.vi works). So this is maybe a dead end.
    How do you guys version control more complex projects? E.g. projects which use classes, libs, labview projects (.lvproj)?
    Best regards
    Jonascj

    Thank you for your reply. You are right, .lvclass, .lvproj and .lvlib are all just xml files - I've just figured that out my self when I accidentally called GIT's default diff on a lvclass
    I've also just spoken to National Instruments. The person I spoke to (from the one of the danish offices) told me that no tools exist at this time (2013-04-08) which will compare those LabView file types, but that there was an internal (National Instruments themselves)  feature request for such tools.
    He also told me another interesting thing which I did not know. The lvcompare.exe (located in National Instruments/Shared/LabVIEW Compare/ on Windows) is actually the not developed by National Instruments, but is either a "fork" of LVDiff (http://meta-diff.sourceforge.net/) or LVDiff renamed. So one could simply obtain the source code from http://meta-diff.sourceforge.net/ (at the bottom of the page "Win32 binary w/source") and add a few property nodes to do comparision of lvclass attributes etc.

  • Version control tool for Mac OS X?

    Hi all
    If using labview on Mac OS X, 
    do you have some version control tools to recommend?
    Thanks  a lot

    As far as i know, LV for Mac does not integrate with source code control provider. LV for Windows has two requirements for this:
    a) Professional Development Environment
    b) A source code control provider compatible to the Microsoft Source Interface
    There is still always (Mac, Linux and Windows alike) the possibility to control source files using the SCC providers client software.
    Many open source project SCCs like CVS or Git integrate, at least in Windows, in the File Explorer.
    I recommend you to research possible solutions like this for Mac.
    The next question is if you want to use a distributed SCC or a local one. Depending on this, you will have to setup a network server with compatible provider (e.g. RhodeCode).
    LV provides both a Diff and Merge tool as EXE (Professional). I am not sure if this is also true for the Mac version, so look for "LVCompare" and "LVMerge".
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Diffing Files in LabVIEW with Perforce?

    I've read the sections of articles about doing a graphical difference in LabVIEW with Perforce here: http://zone.ni.com/devzone/cda/tut/p/id/4631#toc4 and here: http://decibel.ni.com/content/docs/DOC-1681#Graphi​cal_Differencing, but I still can't get it to work!
    When I right click on a VI from the Project Explorer that is checked out and select Show Differences... Perforce complains that it doesn't know how to do the diff on the files. I assume this is because I haven't told Perforce about the LabVIEW Diff features or the .vi file extension types. How do I this? Is there an article I missed somewhere that describes this step by step?
    Edit: I forgot to mention, how do I use the Compare VIs tool in Tools -> Compare -> Compare VIs? When I do this it bring up a dialog in which the first field is the VI I have open. The second field is blank, and that is the VI that I would compare the VI open to. However, since I am using Perforce, the previous file revision are in Perforce. How do I tell this dialog to compare it to a file that is in Perforce?
    Thanks in advance!

    In the LabVIEW help there's a LVCompare.exe topic; under that, look at "configuring source control with."  Following the directions there will allow you to show differences directly from Perforce.  However, within LabVIEW, this shouldn't be necessary -at least, it's always worked "right out of the box" for me with no further configuration.  Which of the two LabVIEW Perforce clients are you using?  You may need to use the command line version in order for differencing to work properly.
    Compare VIs does not work the way you seem to expect for VIs in source control.  It simply compares any two VIs loaded in memory.  To compare with the latest version from Perforce, use Tools -> Source Control -> Show Differences.  If you want to compare something other than your current version versus the most recent revision in Perforce, you'll need to execute the diff from within Perforce.

  • LabVIEW Compare Tool load time of files from repository

    I have the LabVIEW compare tool setup for differences for .ctl and .vi files in Surround SCM source code control system.  The source code control system runs on a networked server.  My PC is on the same network as the server.
    When the LabVIEW compare tool reads VIs that are from a source control repository for diffing against files on my computer, it seems to load the repository files from a temporary folder located in users\username\appdata.  It takes a long time to load VIs that have lots of subVIs because as the tool searches for each subVI the tool begins its search in the vi.lib and instr.lib folders before finding the subVI in the temporary folder.  It is taking a few seconds and sometimes as much as 10 seconds to load each subVI.  This takes a lot of time to Diff VIs that have many subVIs.  Is there a way to make the diffing process go quicker?  Or is this something that would need to be fixed in the LabVIEW compare tool?
    Thanks,
    Gary
    Solved!
    Go to Solution.

    That's the normal behavior of the LVCompare.exe, and the folders at which starts looking for subVIs or control files (.ctl) cannot be modified. The available options that can be configured are the following:
    Configuring Source Control with LVCompare.exe
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/configlvcomp_thirdparty/

  • Integrating TortoiseSVN with LabVIEW's Compare tool

    I’m trying to set up the TortoiseSVN Diff tool, as described:
    https://decibel.ni.com/content/docs/DOC-12175 and
    http://digital.ni.com/public.nsf/allkb/3BEC521972301FF2862576EA00609CA6
    To configure TortoiseSVN to use LabVIEW’s compare tool I added the following for “.vi” file extensions:
    "C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm –nobdpos
    The links above tell you use “Program Files,” but on my system the LVCompare.exe is located in my “Program Files (x86)” directory.
    When I try to run the diff tool (right click on the file in question -> TortoiseSVN -> Diff with previous version), I get the following error:
    I cannot get the LVCompare tool to work with the command prompt either, as described:
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/configlvcomp_thirdparty/
    I did notice that it mentions the Compare tool is only available with LabVIEW Professional Development System.  Does this apply for using it with TortoiseSVN as well? I am running LabVIEW 2011 Full Development System on Windows 7 (64 bit).  The version of TortoiseSVN I am using is: TortoiseSVN 1.7.6, Build 22632 - 64 Bit , 2012/03/08 18:29:39 Subversion 1.7.4.
    Any help getting the LVCompare tool integrated with TortoiseSVN to work would be greatly appreciated!
    Thanks!
    Lauren

    Lauren_CPC wrote:
    I cannot get the LVCompare tool to work with the command prompt either, as described:
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/configlvcomp_thirdparty/
    I did notice that it mentions the Compare tool is only available with LabVIEW Professional Development System.  Does this apply for using it with TortoiseSVN as well? I am running LabVIEW 2011 Full Development System on Windows 7 (64 bit).  The version of TortoiseSVN I am using is: TortoiseSVN 1.7.6, Build 22632 - 64 Bit , 2012/03/08 18:29:39 Subversion 1.7.4.
    Yes it does. LVCompare is only a simple wrapper executable that eventually tries to run a VI in the LabVIEW installation directory. And this VI will not work if the LabVIEW installation is not licensed as Professional Development system.
    Note to the AEs: In the second link of Laura's post, it states incorrectly: Primary Software: LabVIEW Development Systems>>LabVIEW Base Package
    This is completely contradictory to the note in the last link, that states that the Professional Development System is required. A documentation correction request seems in order.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Does ExternalInterface require allowScriptAccess=always?

    I keep reading all over the place people stating "make sure
    that you have allowScriptAccess set to 'always'" when referring to
    ExternalInterface usage. Problem is, I'm a little confusedm because
    as I understand the documentaion, allowScriptAccess is irrelevent
    most of time:
    1) The examples in the Flash documention for EI exclude any
    mention of allowScriptAccess
    2) The documentation of allowScriptAccess makes no mention of
    EI, only fscommand and getURL
    3) My understanding is that the default value of
    allowScriptAccess is 'sameDomain', which should mean unless you are
    doing cross domain scripting(not even sure what that mean, calling
    getURL to an external domain with javascript?), you don't need
    explicitly set anything else.
    From the docs:
    "always" permits scripting operations at all times.
    "never" forbids all scripting operations.
    "samedomain" permits scripting operations only if the Flash
    application is from the same domain as the HTML page.
    The default value used by all HTML publish templates is
    samedomain.
    Regardless, everyone seems to be saying that you need
    allowScriptAccess set to 'always' to get even the most basic
    same-domain ExternalInterface examples to work. I would like to
    hear the reasoning behind this. Thanks!

    smercurio_fc wrote:
    You can put the VIs into different projects. The projects provide the namespace distinction that you need, allowing the VIs to have the same name.
    I'd read the same thing, but don't understand what it means.  The instructions for LVCompare suggest the syntax is something like "LVCompare <File 1> <File 2> <options>".  How does one go about putting an older version in a "different project"?  I tried opening the older version's project and renaming the project "Older Project", but when I specified the files as "NewVersionFolder\Test.vi" and "OlderVersionFolder\Test.vi", I got "Error 193" (undefined).  Even though the project's name is different, the file name remains the same (though the path is different).
    Forging ahead ...
    BS

Maybe you are looking for

  • Adding text field to Fast entry screen transaction F-26

    We need to add a text field in the GL account for payments e.g. 572000, when we are using transaction f-26. We manage to add this field to the screen variant SAP01,copyinng this varaiant into a new one called ZSAP1 but it gives as an error. For doing

  • Trouble with connecting Mac with printing Network of PCs

    Massive Frustrations. I am trying to connect my MacBook Pro with OS X to my existing PC Network. I matched up the workgroup name and the sharing folders seems to be working. The printers are listed and everything seems to be running, but when I tried

  • How to limit the visibility of records of product?

    Hello, I would like to restrict access to a range of products. Specifically, the company has different departments (different OD CRM users), and depending on the department to which it belongs is requested or not the visibility of the products. I tes

  • If statment and semi colon questions

    This morning i was wondering why if(foo); {do stuff} doesn't through a compiler error. If it doesn't through a compiler error then that leads me to believe that it there is a reason to have a ; after an if statment. Any thoughts? I did notice that bo

  • BT deny fallen cables

    Hi BT cables fell on my car in high winds and they deny they even fell, any ideas to get BT legal to do the right thing. Didn't file a police report at the time, maybe I should have. Either my insurance company isn't very good or BT are avoiding taki