LabVIEW Development Best Practices Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Software Engineering Technical Manual and Exercises for LabVIEW

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

  • Introduction to Software Engineering
  • Software Configuration Management with LabVIEW and TortoiseSVN
  • Exercise: Creating a Subversion Repository and Adding Code
  • Exercise: Tracking Changes to VIs Using Source Code Control
  • Tracking Requirements Coverage with NI Requirements Gateway
  • Exercise: Tracing Code to Requirements Documents
  • Performing Code Reviews with NI LabVIEW VI Analyzer Toolkit
  • Exercise: Analyzing Code Quality
  • Advanced Debugging and Dynamic Code Analysis with NI LabVIEW Desktop Execution Trace Toolkit
  • Exercise: Debugging Unexpected Behavior
    • Part 1: Trace an Example in the Development Environment
    • Part 2: Trace an Executable
  • Testing and Validation with NI LabVIEW Unit Test Framework Toolkit
  • Exercise: Unit Testing and Validation of Code
  • Optional Exercise: Finding Un-Covered Code

 

Revision Log

  • 8/20/13 - Updated for LabVIEW 2013 and made minor bug fixes to hands-on manual.  (v 4.1)
  • 8/22/12 - Repackaged for LabVIEW 2012 using a VI Package file.  Demonstration files and script are installed to the 'Create Project' dialog
  • 9/21/11 - Updated manual (v2.1) to correct minor mistakes and released new version of slides
  • 9/14/11 - Updated the database so that it does not generate a run-time error by default.  It must be turned on by enabling the conditional disable structure (for the DETT exercise)
  • 7/20/11 - Replaced manual, exercises and slides with updated versions for NIWeek 2011 (to download the original content, browse versions orclick here)
  • 6/6/11 - Added 'SVN Database NEW.zip,' which contains a new and more 'real-world' demonstration that has been designed for these exercises
  • 6/2/11 - Updated slides now include additional material on configuration management and the use of VI Package Manager

 

Related Links

  • Overview of Software Engineering with LabVIEW
  • Introduction to Configuration Management with LabVIEW

 

Contact Elijah Kerry with any questions at Elijah.Kerry@ni.com

 

 
Elijah Kerry
NI Director, Software Community
Comments
mini09
Active Participant
Active Participant
on

Hi friends,

             Just getting started with the Source Code. I`ve installed my LabVIEW 2012 in E drive & TortoiseSVN in C Drive and in the settings of Diff Viewer is same as discussed above will there be any problem with this kind of Installation?

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Hi Eli,

I tried version 4.0.1.3.34 and the latest version of the exercises manual last time I taught Software Engineering in LabVIEW. We were using LabVIEW 2013 and it worked very well. However the old version, version 3.2.0.15.vip had a build specification included in the project and version 4.0.1.3.34 does not. Do you have any plans on adding a build specification to the project?

Thanks,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Tom-L
Member
Member
on
Regards,
Tom
Justin_Thomas
Member
Member
on

The LVCompare based Diff works great if there are no subvis inside the vi to be diffed. This however does not work if there are subvis.

Is there a workaround for this problem?

EricLM
Member
Member
on

A VI that you're diffing must still have access to its subVIs, although you can just select the ignore all button as the VI is loading. One thing that does help when diffing a VI with an earlier version of itself (like with TortoiseSVN or the TSVN Toolkit) is to send "mine" to the diff tool first. That way all referenced VIs should already be in memory when the temporary file "base" is opened. See the instructions here: https://decibel.ni.com/content/groups/large-labview-application-development/blog/2010/03/29/using-su...

Specifically have a look at the line for configuring the diff tool: "C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm -nobdpos

Also, if you are using SVN, you can download the TSVN Toolkit and it will set up the SVN diff and merge commands for you. http://www.viewpointusa.com/tsvntoolkit

tyk007
Active Participant
Active Participant
on

I strongly recommend using the TSVN toolkit if you are using SVN as your primary source control provider. As EricLM suggests, this vastly improves the workflow experience with SVN, including IDE integration and the Diff and Merge tools.

The highest praise I can give the toolkit is this: Without the TSVN Toolkit I would have moved to Git instead.

FlavioB
Member
Member
on

I'v just installed the last version of Tortoise and the Tortoisesvn kit form ViewPoint systems on my Labview 2012 Professional, but i don't see any integration in my labview (no toolbar, nor particular icons). Any idea on what could be wrong?

Thanks

vishots.com
Member
Member
on

Try restarting LabVIEW

FlavioB
Member
Member
on

Allready done,

even restarted the PC,

Uninstalled the kit,

cleaned the registry with CClearner,

reinstalled,

restarted all.

Nothing happens…

It is a pity because it is a very nice tool.

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Flavio,

I would recommend you contact ViewPoint directly for support. I am sure they would want to find out as much as you do why the tool is not working for you.

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
tyk007
Active Participant
Active Participant
on

Make sure you have installed the appropriate version of the toolkit (major.minor) as you have TortoiseSVN installed. If you have installed 1.8.x of TSVN, then make sure you have a 1.8.x version of the toolkit installed as well. I recommend the current beta on the Viewpoint website.

EricLM
Member
Member
on

Actually, that version is no longer beta! It is now released and available on the LabVIEW Tools Network as version 1.8.2.22. This version will now support LV 64-bit. Thanks for the props.

SHowell73
Member
Member
on

I have the Viewpoint Systems TSVN Toolkit installed in LabVIEW and I recently noticed that I get frequent CPU spikes, sometimes to 100% with TSVN installed. When I take it out, those spikes go away. Not sure whats going on, its almost like a constant "ping" out to a location to check if the anything in the code has changed? Not a problem if so, but to spike the CPU to 100%? hmmm...just curious if anyone else has experienced this behaviour.

Steven Howell
Certified LabVIEW Developer
Certified Professional Instructor
Systems Developer
Optimation - Houston
steven.howell@optimation.us
SHowell73
Member
Member
on

Flavio, I have seen similar issues before with TSVN. If I had already created a project, and then installed the toolkit, for some reason the links would not be there. However, after I install the toolkit and start a new project, the TSVN links are in the project. Maybe something to try.

Steven Howell
Certified LabVIEW Developer
Certified Professional Instructor
Systems Developer
Optimation - Houston
steven.howell@optimation.us
FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Hi Eli,

 

I used version 4.0.1.3.34 last time I taught Software Engineering in LabVIEW. I noticed that the Find Blood Pressure_ms.lvtest is not getting copied to the project created. I don't know if this is a Project Template bug or a specific bug for this package.

 lvtest not copied over.jpg

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
jfalesi
Member
Member
on

Hi, I'm wondering if best practices have changed since 2013. In particular, is SVN still the configuration management tool of choice?

Thanks,

-Jamie