This technical manual examines the typical development life cycle and reviews the best practices and recommendations for programming with LabVIEW in a structured development environment. Topics include configuration management, tracking and identifying changes that are made to code, requirements gathering, code architecture, ensuring proper style guidelines, validation of code, dynamic code analysis, and professional deployment practices.
Table of Contents for Attached Exercises
Revision Log
Related Links
Contact Elijah Kerry with any questions at Elijah.Kerry@ni.com
Good article, Eli. Those who don't have LabVIEW 2009 and LVCompare.exe, can use LVDiff http://meta-diff.sourceforge.net/ and set it up in TortoiseSVN/CVS.
Thanks Jakub. Alternatively, if you want to continue development in an older version, I believe that the LVCompare.exe file will work with versions before 2009, as long as they had the graphical compare tool (so 8.0 or later) built in. That being said, I have not tested this, so anyone who has - let us know!
Hello
I try to use the tool "LVCompare.exe" from the "TortoiseSVN" and generates me the following error message:
An error occurred while running LVCompare.
Invoke Node in LVCompare.vi
<APPEND>
Method Name: <b>User Interaction:Compare VIs</b>
Could you post the exact string you put in your settings for the vi file format?
I just follow the steps in the "EXERCISE: TRACKING CHANGES TO SOURCE CODE CONTROL USING VIS", and after the step 4.b (page 8), then appear the error message. Because that I don’t have more information about the erro.
So my integration with TortoiseSVN works beautifully (I use it all the time), and this is what I have in my settings:
"C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm -nobdpos
(make sure you include the quotes around the path)
In the settings dialog, click on 'Diff Viewer,' then in the right pane, click 'Advanced,' select 'Add' from the dialog that appears, and enter this string for the .vi file extension.
Is this still not working?
Elijah,
Is there any way to add "Diff with previous version" to the Labview Tools menu so that I don't have to right click in Windows File Explorer to compare with a previous version? This is one feature that JKI lacks.
Mark
I use exact your settings (copy&paste from your posting) with LabView2009SP1 and TortoiseSVN 1.6.7, Build 18415
and have the same error:
Invoke Node in LVCompare.vi
<APPEND>
Method Name: <b>User Interaction:Compare VIs</b>
any hints?
Do you have the professional version of LabVIEW?
I have the Full version with Application Builder
I'm afraid that the diff and merge features are only available in the Professional Development Environment.
Very disappointing, as the LVCompare.exe is installed by default (why, when its not working anyway) and the error message is completely useles...
I got the pop-up window "LabVIEW: File version is later than the current LabVIEW version" which stops me from running the "Basic Calculator" project. Anyone can suggest a solution for this? Thanks.
>I use Labview 2009 professional development suit on WinXP and did the setup steps according to the Software Engineering Hands-On Exercises.pdf
The project is unfortunately saved in LV2010 format...
I also did not come round to upgrade to 2010 yet, so I suffer the same. Maybe Elijah could save the project in some older version format
But I like the step by step exercises, very good article!
I use the VisualSVN as the server, and TortoiseSVN as the client. They works well. This article is very good. Thanks.
Elijah, good presentation! I think it would be beneficial to add a chapter on bug tracking (Bugzilla?).
Sergey
thank for your guys discussion content, for me it is important to know.
Ryan
Hi, I just installed tortoiseSVN. The articles are the most helpful in overcoming setup issues with LabView. But I have not been able to find similar information on TestStand. Does anyone have experience in using SVN with TestStand, especially differencing sequences?
Anne
Good Article...Grettings of Ecuador
Hi,
I just installed tortoiseSVN with the same settings as https://decibel.ni.com/content/groups/large-labview-application-development/blog/2010/03/29/using-su....
An error occurred while running LVCompare.
ERROR is German:
Bei der Ausführung von LVCompare trat ein Fehler auf.
Open Registry Key.vi
Aufrufen von LVCompare:
LVCompare <absoluter Pfad zu vi1> <absoluter Pfad zu vi2> [-lvpath <absoluter Pfad zu LabVIEW>] [-noattr] [-nofp] [-nofppos] [-nobd] [-nobdcosm] [-nobdpos]
[-lvpath <absoluter Pfad zu LabVIEW>] - Pfad zur LabVIEW.exe, die für den Vergleich der VIs verwendet werden soll
[-noattr] - Vergleichen Sie keine VI-Attribute
[-nofp] - Vergleichen Sie keine Frontpanel
[-nofppos] - Vergleichen Sie nicht die Position/Größe von Frontpanel-Objekten
[-nobd] - Vergleichen Sie keine Blockdiagramme
[-nobdcosm] - Vergleichen Sie keine Darstellungsoptionen von Blockdiagrammobjekten
[-nobdpos] - Vergleichen Sie nicht die Position/Größe von Blockdiagrammobjekten
Beispiel:
LVCompare c:\test\apfel.vi c:\test\orange.vi
Please confirm that you have the professional version of LabVIEW. Also, what version of LabVIEW are you running?
Does this error occur when you try any VI?
Professional Developer Suite 2011.
I tested some things and it seems that I must have administrator privileges on the PC.
Normal I don't have administrator privileges on the PC but the system administrator tried it with administrator privileges and it works.
Can I also run it without administrator privileges on the PC?
(The installations folder of Tortoise and National Instrument have administrator privileges on the PC also on my account).
Do you have the original error code?
This is the error code, but in German.
Bei der Ausführung von LVCompare trat ein Fehler auf.
Open Registry Key.vi
Aufrufen von LVCompare:
LVCompare <absoluter Pfad zu vi1> <absoluter Pfad zu vi2> [-lvpath <absoluter Pfad zu LabVIEW>] [-noattr] [-nofp] [-nofppos] [-nobd] [-nobdcosm] [-nobdpos]
[-lvpath <absoluter Pfad zu LabVIEW>] - Pfad zur LabVIEW.exe, die für den Vergleich der VIs verwendet werden soll
[-noattr] - Vergleichen Sie keine VI-Attribute
[-nofp] - Vergleichen Sie keine Frontpanel
[-nofppos] - Vergleichen Sie nicht die Position/Größe von Frontpanel-Objekten
[-nobd] - Vergleichen Sie keine Blockdiagramme
[-nobdcosm] - Vergleichen Sie keine Darstellungsoptionen von Blockdiagrammobjekten
[-nobdpos] - Vergleichen Sie nicht die Position/Größe von Blockdiagrammobjekten
Beispiel:
LVCompare c:\test\apfel.vi c:\test\orange.vi
English (Translation):
When running LVCompare was an error.
Open Registry Key.vi
Calling LVCompare:
LVCompare <absolute path to vi1> <absolute path to vi2> [-lvpath <absolute path to LabVIEW>] [-noattr] [-nofp] [-nofppos] [-nobd] [-nobdcosm] [-nobdpos]
[-lvpath <absolute path to LabVIEW>] - path to labview.exe to be used for the comparison of the VI
[-noattr] - Compare VI no attributes
[-nofp] - Compare no front panel
[-nofppos] - Do not compare the position / size of front panel objects
[-nobd] - Do not compare block diagrams
[-nobdcosm] - Compare Options block diagram representation of any objects
[-nobdpos] - Do not compare the position / size of block diagram objects
example:
LVCompare c: \ test \ apfel.vi c: \ test \ orange.vi
Hej Schian,
I reckon your Tortoise settings are wrong. This is how it looks at my computer.
If you add the external program for .vi extensions, the line should be something like this
"C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm -nobdpos
Note that the " and so on all have to be put in exactly as shown above. Your Program Files directory might have different name (like 'Programme'), but you get the idea.
Cheers, Fini
I have the same settings:
On this pc i have no administrator privileges. I think thats the problem.
Could that be? And can i give some folders privileges that it works?
I tried it out but it works. On my normal PC where I have admin privileges (and installed Labview and Tortoise) which is under a WIN domain controller I logged in with a non-admin user. After setting up the LVcompare things in Tortoise for this user I could use the compare just as usual. So there is no need to be admin to work with this feature. (Interestingly the LabView licence seems to be bound to the user, as this non-admin user runs LabView in trial mode.)
How far gets the Diff before the error occurs? Do you see the LabView splash screen (assuming LabView was not running when you started the diff via Tortoise)? The error message you get is a little bit nondescript, I've never seen that.
As admin i can use compare. Everything is OK and works well.
Without admin privileges. There is nothing before. The error warning is the first window.
I assume the vi you want to compare is "open registry key". I tried several things to replicate the error ... to no avail. The only thing that comes to my mind now is ... is the checked out folder owned by the non-admin user? Or does this non-admin user work with the data (i.e. vi) files owned by the admin? In all my tries here I always checked some project out, cleanly, by that non-admin user in a folder of that non-admin user. Then changed one vi and did the diff. This error might come if Tortoise or LVcompare is not able to read the relevant files, meaning the actual .vi file and the files hidden in the .svn folder. Just a guess.
What operating system are you using schian?
I believe the problem is that on your particular setup, the user doesn't have permissions to read the registry keys to the windows shell command for opening .vi types (what LVCompare uses to determine where the LabVIEW executable is to launch on Windows). You can possibly workaround this problem by:
1. log in as administrator
2. run regedit
3. got to HKEY_CLASSES_ROOT \ .VI key
4. pop-up on it and select "Permissions" to give everyone read permissions
5. look at the "Default" string value in the right pane. (On my Windows XP 32-bit machine, it is "LabVIEWInstrument"
6. go to HKEY_CLASSES_ROOT \ LabVIEWInstrument (or whatever is in your default string value for .VI key)
7. give everyone read permissions on LabVIEWInstrument key (or whatever is in your default string value for .VI key)
Hi SMcGraw,
thank you for your solution. I tried it and everything works well.
Thanks to all
Patrick
Glad it work out for you!
By the way Eli, I have added a similar setup to my SmartSVN to allow VI comparison.
Use C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe in the External comparator command and ${rightFile} ${leftFile} in the Arguments.
I have also done a similar setup to compare my TestStand Sequence File as well. Therefore you should be able to do this with TortoiseSVN. For the command line use C:\Program Files\National Instruments\TestStand 4.2.1\Bin\SequenceFileDiffer.exe and the Arguments are ${rightFile} ${leftFile} as with the LabVIEW setup.
Regards
Ray armer
Hi ElijahK,
I can't open the package. I have an 8.5 licensed version, but I try with 2010 and 2012 trial version, and error message from VIPM is always the same:
"This package is not compatible with your operating system or any LabVIEW version installed on your computer."
My OS: WindowsXP (32bits)
Thanks!
Please be sure that the LabVIEW version you've selected and configured from the drop-down is 2012 (as shown below)
This is the error message, with the 2012 LabVIEW versión configured:
It's the trial versión, could be the reason?
I think you should be using a proper release not the beta version
I do see the same error as akapero with the released version of LV/VIPM. Any hints?
I just uploaded the file again - can one of you verify that this has addressed the problem? (works on the 3 machines I've tested it on)
It's working now. Thank you.
The Good News is that the VIPM package installs fine on Window 7 (64) + LabVIEW 2012 (32-bit). The Bad News is the PDF file still is call the "Software Engineering Techincal Manual and Exercises v 3.0". Now, I realize "Techincal" is a technical NI term for "Technical", but for those of us not familiar with internal NI lingo ... (just kidding!)
BS
Elijah,
The PowerPoint slides mesh nicely with the Exercises in the Technical Manual. However, Slide 32, "Create a Configuration File by Scanning a Project", does not seem to have a corresponding Exercise. What is this? Is this topic covered somewhere that I missed? [By the way, I know I said "call" instead of "called" in the previous post ...].
BS
Hey Bob,
I've corrected the typo - good catch! Sorry for the lack of details on the configuration file. This is a very useful feature of the professional version of VI Package Manager, as it simplifies recreating and tracking all of the VI Packages that a project uses. Instead of having to transport and share numerous package files, ensure that they're all the correct versions, and manually install them all individually, you can create a single file that contains all of this information. For more info, check out JKI's website on Configuration Files.
Good Article...Grettings of Ecuador
great work
good article !
you should add something in the next version : how to branch and merge with SCC (with practical example), and indicate how to organize project, libraries, files, to minimize (if not avoid) coupling between modules.
Philippe
Not sure it would be a good idea to add more than some very generic mentioning of branching. Each SCC system is quite different in that respect and the branching support in SVN, just to name one of the still most popular SCCs out there, is quite limited. That is probably because SVN really wants to be simple to use, contrary to something like GIT for instance which strives for a full featured solution no matter how complicated it gets to use.