LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code management/organization help or tools

Greetings!

This post could easily be sub-titled "I Have A Sneaking Suspicion I've Written This VI Before!", and that gets to the heart of the problem I'm trying to solve. I am looking for input for the best means of organizing code, be it an existing code base or a large project. I have to deal with both, as I'm the sole LV developer in my group and the primary "NI guy" in the company. Most of what I'm working on lives in a single (very large) project, but I have other, smaller projects as well. I use TortoiseSVN for version control, but that doesn't really seem to give me a means to keep track of the code I've written. Because of the nature of my job, I tend to work on various projects in fits and starts, sometimes with lengthy gaps between coding sessions. This has led to many instances of me re-writing a function because I couldn't quickly locate the original.

 

I can't be the only developer with this problem, so I'm hoping someone out there has found some sort of code organization strategy or tool that I can try.

 

Thanks!

Message 1 of 5
(2,783 Views)

Are you using other programming languages like ANSI C or C#?

If yes: How would you solve it there?

 

Remember that LV is also a programming language. So everthing concerning Software Engineering and most of coding practices also applies here.

That being said, i can imagine that you will find the print tool quite useful (Edit >> Print). It can create screenshots of your code for documentation purposes automatically. Also, you might want to look into the VI Package Manager for documentation tools. The LV Tools Network is also a valid source (similar to the VIPM).

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,773 Views)

No, I don't program in any other languages, at least not enough to have an established mindset for solving this type of issue. I've not considered using using the print tool in the manner you described, but I'll look into it and into VIPM. Thanks!

0 Kudos
Message 3 of 5
(2,764 Views)

As far as code organization, it is mostly making good use a structured libraries and directories.  Do you not do the same for any documentation you have to maintain (build of materials, schematics, work instructions, etc.)?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,762 Views)

Here are a few tips:

1) Use lvlibs to create libraries to reusable code - when you have a few VIs that perform a similar function (e.g. logging VIs, data manipulation VIs) then create an lvlib and put them there. Organise the lvlib and it's VIs to be in its own folder (that way it's super easy to move/copy that library around without any weird dependencies)

2) Of course, you should be using source control and that goes for your re-use libraries too.

3) For sharing your reuse code between projects, you can either create an SVN repository containing the VIs which you then check-out to your LabVIEW folder (e.g. vi.lib / user.lib) or learn how to use VIPM to create VI packages which you can use to distribute/install your shared code. I prefer the VIPM route as it works better when you come to change LabVIEW version, you simple reinstall the VI package in the new version of LabVIEW.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 5
(2,746 Views)