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?
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.
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...
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.
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.
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 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.