I want to share data between two compactRios, running a realtime OS, and a host vi running on a windows PC. The data must be available on the host vi and on the two cRIOS.
I've used network shared variables and I have a big library with all those variables.
I don't know where I am supposed to put this library in my project: should I put it on my windows PC, on a cRIO?
I've made a few tests and so far this is what I've found out:
- If I put the library in the windows target, none of the cRIO can see the network variables (if a update one variable on the windows target, it is not updated on the cRIOS)
- If I put the library under one of the cRIO, the host and the cRIO which hosts the library can see the variables but the other cRIO cannot.
So, is there a problem with the way I use network shared variable. Where should I put the library containing the variables?
in my case i have 1 cRIO and a Host PC and i put the library under the cRIO and i am able to read and write variable from Host also, you can check the NI DSM in the Tools Menu to check whether the variables are deployed or not, once they are deployed and all the Targets are on the network in principle you can read/write them.
Other solution will be that you move the library to both cRIOs.
I am attaching a picture in which the variable target relevancy is discussed. I hope this helps.
Normally you should perfectly be able to "share" network published shared variables between all the targets (pc + 2 cRIOs)
Can you share an example project (including all dependencies: VIs, project files, aliases files, ...) that allows you to purelyget this unusual behavour?
I want to try to reproduce it at my side.
This way I can better see if it could be a network infrastructure issue (different subdomains etc..) or rather something that is configured incorrectly (project settings, cRIO settings, windows settings,...).
I've finally managed to make it work with the shared variable put on one of the realtime target. I did a mass compile and somehow this seemed to have sorted things out...
However when I put the shared variable on the host PC (Windows) it still doesn't work.. I've found out that the variable are deployed with the wrong IP adress. The deployment pop-up tells me that they are available at a 192.168.56.XX adress while the IP adress of the host PC is in the 10.127.13.XX range!
Does somebody know how to, basically, change the deployment IP adress of a shared variable? So that they are deployed with the right IP adress?
the IP address of a variable is associate to the target in which it is deployed, you should deploy the same variable in other target as well.
is it possible that the Windows host system has TWO network adapters installed?
I find it possible that the cRIO connect to one adapter (192.168.56.XXX side) while it is connected to the company network with the other adapter (10.127.13.XXX side).