LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI revision history numbers match, but file sizes differ.

Hi all,
I am using LabView 7.0.  I am trying to create a utility that compares the VIs on two different computers to make sure that the VIs distributed on both systems are the same.  I tried accessing the Revision History number to compare the two files, but the execution was very slow because it is remotely opening VIs to access the property node and I am analyzing 100's or thousands of files.  I then tried to compare the files by file size using the File/Directory Info.vi and noticed that many of the files that had the same revision history number had different file sizes.  What may be causing these file size differences when the revision numbers indicate that they are the same?  I do not believe that anyone has modified the revision history numbers for any of the VIs manually.  Also, is there be a better method of comparing the files than what I am doing?
Thanks in advance!
0 Kudos
Message 1 of 6
(2,982 Views)
Hey John_N,
    If you open these VIs that are different sizes, are they exactly the same?  I realize you have alot of VIs you are checking, but maybe just check a couple of them for slight differences.  Also, anytime the VI is saved, the revision number will increment.  This could cause a change even though there is no fuctional difference between the VIs. 
Brian B
Account Manager
National Instruments
0 Kudos
Message 2 of 6
(2,952 Views)
John,

Two VIs having the same revision number aren't necessarily going to be the same.  If you copy a VI to another machine and make different changes on both machines they will both end up with the same revision number yet the VIs themselves will be different.

Checking the file sizes seems like a good (quick) way to catch large changes but I'm not sure how error prone such a check would be (e.g. how often changes result in a VI with the exact same file size or whether storing VIs on different file systems changes the file size reported by Windows)

Is opening each VI and looking at a property node going to be too slow for your needs?  If so then checking file sizes sounds like the best way to do what you want short of having your developers rename VIs whenever they change them.

Simon H
Applications Engineer
National Instruments
0 Kudos
Message 3 of 6
(2,947 Views)
Hi,
Thanks for your responses. I investigated the problem some more and it looks like the file size differences are caused when someone recompiles the VIs.  I used the "compare VI" utility to compare VIs with different file sizes and matching revision numbers and found zero differences.  So i ran this experiment:

1) I then created two identicle copies of a VI, making sure that the file sizes matched. 
2) When I forced a recompile on one of them (Ctrl+Run Button) and saved the changes, the file size changed! 
3) I went through and used the "compare VI" utility to compare the two files and there were zero differences and both had the same revision number.

I guess the revision number only increments when you make some changes to the VI, becuase I did not have to change anything to get the file size to change, I just recompiled and saved.

I still have the problem of compiling a list of revision numbers however.  I am happy with the results of my VI except for how long it takes to execute.  My VI simply opens a VI reference, accesses the revision number through the property node, and closes the reference for the VI.  This is done recursively for all of the VIs in a directory on a remote computer and takes about 25min for ~500 VIs to complete.  I guess it takes so long because I am remotely opening all of those VI front panels over the network.  Comparing file sizes is much quicker (20 sec to execute) but it would be nice to have both the revision number and the file sizes to determine the state of the code on a particular machine.  Is there any other method of getting the revision number that might be quicker?
Thanks again for your help!
0 Kudos
Message 4 of 6
(2,943 Views)

Brainstorming...

Could you place copies of you program on the remote computers and then launch it remotely?  Maybe then use TCP/IP to send back the data to your computer?  That way the processing is happening at the local machine.

0 Kudos
Message 5 of 6
(2,936 Views)
Paulmw,
    Thanks for the suggestion.  I ran my VI locally on the computers I wanted to analyze and the VI executed much more quickly.  I was hoping to find a solution where  I wouldn't have to distribute software to all of the machines that I want to analyze because of the overhead (in addition to the overhead of having to go to each of those machines to execute the VI).  I was thinking of using the VI server and the "invoke node" VI to run the VI, but I believe that that would require LabView to be running on all of the machines I want to query.
0 Kudos
Message 6 of 6
(2,928 Views)