From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Network shared variables between host bi and two real time targets

Hi,

 

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?

 

Thanks!

peper2001

0 Kudos
Message 1 of 6
(2,483 Views)

peper2001,

 

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.

 

 

 

Regards,

azy

0 Kudos
Message 2 of 6
(2,460 Views)

Hello peper2001,

 

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,...). 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 3 of 6
(2,440 Views)

Hi,

 

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?

 

thanks,

 

peper2001

0 Kudos
Message 4 of 6
(2,433 Views)

Hi,

 

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.

 

 

 

Regards,

azy

0 Kudos
Message 5 of 6
(2,423 Views)

Pepper,

 

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

 

Norbert

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