LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Distribute source code to different machine with different version of NI

Hello all,

 

background -

I created a project which uses a library download from VIPM and stored in the Labview 2013/vi.lib/LiFA folder on my computer.  LIFA is the library which was downloaded and I have since then wrote many subVIs to help with my project, all stored in that library too. I am using LV 2013 to write these VIs.

 

What I want to do -

I now need to transfer my code to a different computer with a different version of NI installed on it.  I looked around and I have found this and this.  The first link tells me how to build each project I'm working on and the second one tells me how to save each for previous version AND build said project.  Super easy, I get it.  However, I'm running into an error when I try to save my LIFA library (stored in .../vi.lib/LIFA) for a previous version.  I'm getting a pop up that says "cannot save item <labview>\vi.lib folder to previous version".  

 

Question - 

What would be the best way to go about distributing the source code while it will be saved for a previous version.  I know cross linking is a problem and I don't want to duplicate the entire LIFA library somewhere else just to save for a 2011 version of LV distribution.  Any advice?

 

Thanks,

Matt

 

EDIT:

 

Additional question.  Once I'm ready to distribute my code, I'll need to install NI-VISA with it.  is there a way that I can create an installer to add NI-VISA?

0 Kudos
Message 1 of 8
(2,978 Views)

Matt,

 

first of all: you should not place custom created code in the vi.lib folder.

It is already very questionable that a library not developed by NI installs into this folder.

 

You should use the user.lib folder for this library.

 

If LV cannot downsave the library components, the only thing you can do is to track the source of this issue and re-program the part of the algorithm which is creating it. In most cases, this should be (more or less) possible, but there are cases where you wont stand a chance. Those library components wont be downsavable.

 

So essentially, you will have to duplicate the library to rework some of the vis and then downgrade the library.

 

Norbert

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

Creating an installer which includes NI-VISA is easy, just check the Additional Install tab.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 8
(2,939 Views)

@Norbert_B wrote:

Matt,

 

first of all: you should not place custom created code in the vi.lib folder.

It is already very questionable that a library not developed by NI installs into this folder.

 

 


Norbert, 

 

The original LIFA code was written by Sammy_K.  I believe he is an NI employee as he's done several projects getting LV to talk to other things.  When I started this project, I had a basic understanding of how LV works, and I've I progressed, I've gained more understanding.  However, where LV calls things is still unknown to me.  Could I just move my LIFA folder to user.lib and relink everything on the palette set? I'm going to have to redo the palette set anyways, so that won't be a big deal for me.

 

 

/Y,

 

I was poking around and found I can "Include hardware configurations from MAX" and I'm looking into that now.  My Addition Installer tab only has "NI LV run-time engine 2013" and not NI VISA.  I'm looking into the Hardware configuration stuff now.

 

Thanks for the help guys,

Matt

 

0 Kudos
Message 4 of 8
(2,929 Views)

You mean your Installer properties doesn't look like the attached picture?

 

The Hardware config probably wont help right now, it's the DaqMX tasks and cards, but not drivers.

 

Do you have NI-VISA correctly installed yourself?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 8
(2,924 Views)

@Uke88 wrote:

[...]The original LIFA code was written by Sammy_K.  I believe he is an NI employee as he's done several projects getting LV to talk to other things.  When I started this project, I had a basic understanding of how LV works, and I've I progressed, I've gained more understanding.  [...]

Matt,

 

the vi.lib folder is recommended to contain only LV supplied libraries (including those coming from official NI modules/toolkits).

The reason is that if re-running the LV installer, it could reset the vi.lib folder. So you could possibly lose all work done in that library as it is deleted.

 

Granted, this situation will most likely not occur, but it is the point why it is recommended to use "user.lib" (as this will be left untouched).

 

Regarding "re-linking": Depending on how this library was developed and what references it uses as dependencies, there is possibly not much to change. But you are correct that there can arise work in changing existing library functions to relink correctly to "standard" libraries. But this work should be low as there are tools like mass-compile....

 

Norbert

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

/Y,

 

I figured it out...  What happened was I was trying to use my .vi as the source code for the installer.  Doing it this way wouldn't work.  I then built the vi as an exe and then used that build as my source code and I can see NI-VISA Runtime 5.4 on my Additional Installers list (see attached picture).  

 

I feel like I learned to run before I could walk with this project.  I can program pretty well through LV, I've learned a lot, but my basic understanding of LV is sub par and I'm trying to get better.  My views have been, learn what you need to for the current problem and then learn what you need to for the next problem.  Unfortunately, LV settings and such was at the end of the list of needs >.<  O well, hind sight is a funny thing.

 

Matt

 

EDIT:

 

Didn't see you posted Norbert, must have been during the writing of this reply.

 

I originally installed LIFA through the VIPM.  So that probably why things were in the vi.lib.  I'm currently trying to get a build of my code out for my friends to test and then I'm going to link everything to the users.lib VI.  It'll be a pain, but worth it IMO.  I REALLY don't want my code to get over written >.<  that's bad news bears all around.

 

Thanks for the heads up!

0 Kudos
Message 7 of 8
(2,916 Views)

Question about moving my folder from vi.lib to user.lib.  I'm unsure as to how to go about doing this.  I copied everything over to the user.lib folder and now I'm not sure if I delete everything in my vi.lib then mass compile the VI so the references get updated or what.  I really, really, don't want to have to rewrite this code.

 

I looked here and saw that mass compile "It checks the existence of the subVI's and relinks the subVIs to the main VI".  Is there a way I can just relink instead of having to delete all the old code...?

 

Matt

0 Kudos
Message 8 of 8
(2,895 Views)