From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically deploy NSV library with binding

I would like to programmatically deploy a NSV library to a Windows PC that has binding to a cRIO.

If I stop the app that is running on the cRIO I can do this from the project.  Unfortunately, the DSC deploy library vi

and the deploy library invoke node will not work.  Anybody have any ideas?

0 Kudos
Message 1 of 7
(3,001 Views)

Ok, it appears that you can do this if the binding uses an absolute IP address of the target instead of a project based target name.

I am not sure why the target name could not get resolved when the deployment is attempted.  I guess NI could have offered this

but for some reason did not.  In my case I need to be able to retarget the binding programatically so I guess I will have to initially setup the binding to

be a default IP address and then retarget in my code initialization  - quite a pain in the arse.

0 Kudos
Message 2 of 7
(2,996 Views)

So now I am interested in how to do this with PSP based bound libraries.  All my libraries are created in advance as 'template' libraries.  They are designed so that all the definition is in place except for the final URL for the binding.  This means that I will need to first check to see if the library is already deployed, if not then I will need to programmatically deploy it, then I will need to change its URL to the correct IP address and then redeploy again?  I am not sure of the sequence of operations, if anyone has any ideas I would love to hear about it...

0 Kudos
Message 3 of 7
(2,976 Views)

Hi sachsm,

 

In order to help point you in the right direction, can you provide a more comprehensive explanation of the application you are working on? We might be able to come up with a better approach if we better understood what you are trying to accomplish.

Sanjay C.
Embedded Software Product Manager| National Instruments
0 Kudos
Message 4 of 7
(2,951 Views)

The architecture of my software is already complete and functional.  I am only looking for ways to emulate being able to programmatically deploy NSV libraries that have Project bindings. Currently, I have to rebind the library manually with a fixed IP target address.  Then in my app, I programmatically rebind to the correct IP address.  The reason for doing this is that I have multiple HMI's that are each bound to a cRIO and the HMI software is generic so I do not know the binding until runtime.

0 Kudos
Message 5 of 7
(2,947 Views)

Hi Sachsm,

 

You are correct that Deploy Libraries.vi does not work when a variable in the library is bound to a Project item.  The workaround is to use the NI-PSP URL instead, which it sounds like you are already doing.  Are you successfully able to rebind the variables at runtime once you know the IP address, or is that approach not fully working for you?  Unfortunately, right now I don't know of an easier way to accomplish it.  I'm working on compiling some more information and hopefully workarounds for this issue, however.  Could you let me know where you found the information that the Project variable bindings were causing your problem?

 

Thanks,

Morgan S

Applications Engineer

National Instruments

0 Kudos
Message 6 of 7
(2,924 Views)

Hey Morgan,

 

Thanks for your reply.  In the help for the deploy library method there is a mention that it will only work for PSP binding.  I have converted all my project libraries to PSP and can now programmatically deploy and then rebind to the IP address of my choice.  It seems to work well.

0 Kudos
Message 7 of 7
(2,917 Views)