11-02-2009 11:22 PM
Thanks, Hueter. That helps a lot!
I would still like to figure out how to connect to shared variables between PC's, but for now, I got things working by using DataSockets on Machine B and giving it Machine A's IP in the Data Socket Open. (Well, I think I've got it working. Still a bit of testing to do...)
DaveT
11-06-2009 10:53 AM - edited 11-06-2009 11:02 AM
Dave,
Here's the solution I tried to explain the other evening after the user group meeting. It will require that you install LV RT and probably at least some part of NI-RIO on machine B so that you can configure an RT target in the LV project on machine B (even though you won't actually use that target).
Situation
On machine A you have a running LV application with SVs deployed to machine A. The IP address of machine A is a known value.
Solution
On machine B create a new LV project. Using New >> Targets and Devices >> New target or device, configure a new RT target (PXI, cRIO or Fieldpoint) in your project. This target does not physically exist in your system, but you can add it to the project by selecting the specific HW you want. In the properties of the new RT target configure its IP address to the same IP address as machine A. This RT target is your placeholder for machine A in your LV project on machine B.
Copy the SV libray that is deployed to machine A to the drive of machine B and add it to the new RT target in the project. In the right-click menu of the SV library on the RT target on machine B unselect the 'Autodeploy Variables' option.
Now create a new VI on My Computer in the project on machine B. You can then place any of the SVs in the SV library (listed on your RT target) in the new VI to create static SV nodes. Run the VI on machine B.
LabVIEW will connect the SV nodes in the VI on machine B to the SVs listed in the project. It will use the IP address of the RT target to find the SVs on the network using the PSP protocol. Because the SVs are already deployed to machine A, LV on machine B will be able to connect to them without deploying them again and verifying the RT target. In effect LV does not know that the target is a PC and not an RT target, as it only uses the PSP protocol to connect to the SVE on that target identified by the IP address.
I tested this using LV 8.5 on my laptop connected to SVs on my desktop and it works.
In short, static IP nodes can only point to SVs that exist in the project and we therefore need to crate a placeholder target and SVs.
The networked device/computer option in the project is only intended as a host for remote FPGA targets. It can not be used for remote VIs or shared libraries. This is something we are working on to add more functionality.
11-06-2009 11:02 AM
Christian,
Thanks for working that out. It basically makes sense, as it follows the general paradigm that you need to show a library as deployed on another target within the project on Machine B.
I am really surprised that this is such a difficult situation to accomodate. Using SV's between a Windows machine and an RT is likely the most common situation. But the very existence of NETWORKED SV's suggests that it should be easy to use them between multiple PC's as well. I would have thought that this would be a fairly common use case. The fact that you have to install RT just to be able to target an additional machine, and that you have to fake it into using an RT target for the PC is a bit awkward. Is this any better in LV 8.6 or 2009? Or are there plans to improve this in newer versions of LV?
Thanks again,
Dave
11-09-2009 11:22 AM
Using the DataSocket API in LV 8.5, 8.6, or 2009 or the new Variable API in LV 2009 you can access shared variables on the network without having them in the project.
You can create a node-like representation by wrapping the API in a VI.
The following methodology to implement the node will work with the DS or Variable API.