LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Put in order a project

Hello everybody,

 

I need a piece of advice. I have been working in a very big Labview project. I inherit this project from a futher colleague, and when i got it, it was still quite large. Then, I know now I haven't been doing it properly at all,  but I have reused some subVIs, I have created versions of others (keeping the oldest versions in the same proyect), and so on...

 

Now I have to tidy it up,  however I don't know very well what to do first. I don't want to lose any file or the program to stop working.

 

Does someone have any idea?

 

Thanks!!

0 Kudos
Message 1 of 14
(3,804 Views)

I also was given a program that was very large and the best thing I did was organize it put all the files that are associated with eachother together and than go from there

 

hope this helped.

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 14
(3,800 Views)

Something you have to do in order to cleanup a project is to do major refactoring to the code. If you manage to identify uneccessary/redundant code, you will start to efficiently to slim the project....

 

hope this helps,

Norbert 

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

1000a wrote:

Hello everybody,

 

I need a piece of advice. I have been working in a very big Labview project....Now I have to tidy it up,  however I don't know very well what to do first. I don't want to lose any file or the program to stop working.

 

Does someone have any idea?

 

Thanks!!


0) Bakup, backup backup! 

 

1) If you don't have one already, start by creating a Tree.VI (also called Catalog.VI or FakeRoot.VI )for all of the top level or dynamically called VIs.

 

2) Create a Source Distribution (for the Tree.VI and all of its sub-VIs) in your project and configure it to duplicate the hiarchy to a new location.

 

Once you create the source distribution it will pick-up all of the VIs are that are used and it will relink the new files leaving the old un-used files behind. At that point you will have a clean set of only the VI's used by your app.

 

Notes:

THe above steps will not preserve support files (*.doc *.txt, etc) so you have to add them to the source distribution if you need them.

 

If your code has hard-coded paths the above file will have to be moved back to their original location after deletein gthe old stuff.

 

I have heard reports of the source Distribution not working correctly. If so use the "Save for previous version" on the project and just choose the same LV version.

 

have fun!

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 14
(3,779 Views)

Concerning Backups: Why not start using Sorce Code Control like SVN.

You certainly will do something wrong (I did so so many times), so being able to revert to the last change made (or any) saves you so much time over trying to fix things once they are gone broken.

 

Also I wrote some tools such as: List all VIs that are not called and List all VIs that are called and reside outside the Project Folder. Even they are just hacked together, they help me cleaning up the structure.

 

Also the OpenG builder using namespaces and creating a developement distribution has helped me.

 

Felix

0 Kudos
Message 5 of 14
(3,761 Views)

Thanks to all of you for your answering.

 

I am little by little reading and understandin them, because I am right now working in other proyects and the cleanning-up one is not the most appealing for me :s. Anyway,...

 

Harold has adviced me to put all the associated files togethers (I guess in folders). However, others time when I have tried to move files from one location to another (to a folder), I have get mistakes, like conflicts or "file not found" ones (I speacially hate the conflicts).  (Just in case I could give you for information, I am using Labview 8.6 and creating a new Labview proyect for any proyect I have to develop)

 

Actually right now I am working in a new proyect and I can reuse many VIs. I was trying to do things properly, organizing files in folders since the beginning and so on. However, even if I was being careful copying first the lowest level SubVis of the VIs I wanted to reuse, I got conflict mistakes :s. The main problem is now I am starting to fear the fact of having to rename, to move or just to reuse VI. Like if working with Labview proyects were not very flexible...

 

So I want to learn how to do things right (because I am sure I have these problems because I am doing sth wrong):

 

How do you manage to avoid the conflicts?

 

And also: do you put all the SubVis that are involved in the proyect in the Labview proyect tree??

Do you organize the Labiew proyect using folders?

What kind of folder do you use, because I have seen there are 2 kinds: Virtual folders (that you can create) or Folders (that you can add to the Labview proyect)? What is the difference???

 

Thanks very much for your time

0 Kudos
Message 6 of 14
(3,700 Views)

Moving files on disk is not a very good idea if they are part of the project. Please use the "Move on Disk" option in the file view of the project explorer.

 

You must not have VIs with the same name in your project. You can, nevertheless, use lvlibs to use namespacing in order to make VI names unique, but this is not really recommended. The reason is simple: The files on disk still have the same name and therefore can get mixed up quite easily......

 

hope this helps,

Norbert 

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

But is it possible to have 2 Vis with the same name in differetnt proyects???

 If it isn't possible, there is no way to reuse VI, or it is quite difficult, because the only option I could think of it is to copy all the subvis (changes their names), then copy the VI and relink the subvis to the rename ones. Is there any essay way to do that???

 

 

0 Kudos
Message 8 of 14
(3,673 Views)
you can use the same subvi in different projects
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 9 of 14
(3,671 Views)

Just to add something to Harold's answer:

Please aleays keep in mind that the subvi is shared between different projects! If you forget that, it may happen, that you are implementing some changes in this subvi leading to wrong behavior in the second project....

 

Norbert 

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