LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to prevent vis consisting of a lot of subvis

Solved!
Go to solution

hi all,

I need your suggestions about preventing the confliction of working with two PC on the same vi. I built a program and it has a lot of subvis and I have to work with 2 PC. When I detect an error on a subvi or anything else I have to change the subvis and releated things in the same PC by transfering all subvis and vis folder by USB stick. sometimes this causes some error. for instance I could delete some subvis unconsciously. I read about labview project and libraries but any documents are not explanatory. I want to collect all my vis and subvis in a one folder or project. but I really do not know how to do it. And also I want to change subvis or vis in this folder whenever I want. How can I deal with this? Thanks in advance.

 

Regards.

 

 

Egemen
0 Kudos
Message 1 of 21
(3,105 Views)

First, if you're not doing it yet, work inside of a LabVIEW project (if you have LabVIEW 8 or more recent), this will help you a lot to keep track of you VIs and help avoid cross-linking.

And to go to the next level you might want to use a source code control, see more information on community.ni.com.

 

Hope this helps.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 21
(3,099 Views)

thanks for your suggestion. I really do not know how to work with project that's why I asked. All documents about labview project is not clear to create and work with them properly, even if in help files and ni.com. how could I learn to constitute labview project?

 

Egemen
0 Kudos
Message 3 of 21
(3,093 Views)

You can use state machine architecture or any suitable architecture, which will help you to aviode this

 

 

Regards
Prabhakant Patil
0 Kudos
Message 4 of 21
(3,087 Views)

@TiTou wrote:

First, if you're not doing it yet, work inside of a LabVIEW project (if you have LabVIEW 8 or more recent), this will help you a lot to keep track of you VIs and help avoid cross-linking. [...]




Very good proposal, Titou.   When working with a project you create Build Specifications, especially a Source Distribution will target the demand to allow "copying everything to a different PC".

0 Kudos
Message 5 of 21
(3,078 Views)

If you're starting out with LabVIEW, I really recommend using a lvproj, if you need to learn how to use it, I suggest you watch some tutorials on ni.com

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 21
(3,077 Views)

I really do not know state machine architecture. All I want to do is collecting all my vis and subvis in a folder or labview project. So I can carry all releated vis and its subvis and also it is possbile to configure these vis in the project. how can I constitute this one? I have a main vi and its subvis. how can collect all of these in a labview project?

 

Egemen
0 Kudos
Message 7 of 21
(3,075 Views)
Solution
Accepted by topic author newbieeng

Create a new empty project, save it neer your main VI then the main VI to the project. The project will automatically find all the dependencies of your main VI (subVIs, CTLs, etc...), in the project windows you have a "Files" tab, from here you have a tree that shows you where are all the dependencies of your project. this is really helpfull.

If you go back to the "Items" tab, and create a new build sepcification (right clic on the icon) then chose "new >> Source Distribution" you can define an "export" that will include all you source code.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 21
(3,071 Views)

@TiTou wrote:

Create a new empty project, save it neer your main VI then the main VI to the project. The project will automatically find all the dependencies of your main VI (subVIs, CTLs, etc...), in the project windows you have a "Files" tab, from here you have a tree that shows you where are all the dependencies of your project. this is really helpfull.

If you go back to the "Items" tab, and create a new build sepcification (right clic on the icon) then chose "new >> Source Distribution" you can define an "export" that will include all you source code.

 

Hope this helps



Thank you TiTou, thank you so much. I learnt how to start to use it. when I add the folder (snapshot) that includes my main vi I can see all subvis and others under the dependencies section in the project.  I saved this project. If I transfered thsi project to another PC, would my main main vi work properply without any confliction? I asked because the PC that is intended to be transfered this project does not include subvis under the ... LabVIEW 2009\user.lib and \ vi.lib. And also when I changed any subvi in this project, will subvis change under the LabVIEW 2009\user.lib\SubVIs in the main PC? Thank you very much again. One more question, when I transfer all my vis and subvis to the other PC, carrying this labview project to the other PC is enough?

Egemen
0 Kudos
Message 9 of 21
(3,061 Views)

Hmm really if you work on your project on different computer, maybe you should consider using source code control along with server or web hosting.

 

Maybe another way would be to have all the source code (projet and VIs and any data or config file) on an extrenal hard drive, so that when you go from a computer to another one you don't have to copy your source code.

 

If you don't want to have your code on an external drive, and that you use the build specification "source distribution" and edit all the settings that go with it, when you "build" it it will generate a zip or folder or llb (depending on your settings) and that should contain everything you should transfer.

That said you could also have all the source code (including the lvproj file) in a folder with subfolders and transfer that folder without using the source distrib.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 10 of 21
(3,025 Views)