LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting 3 CompactRIOs to 2 PCs

Hello:

 

 

  I am writing this thread to know if there is any way to connect several CompactRIO (in my case,3 of them, model 9073) to 2 Host PCs. The purpose of the network is to access 3 CompactRIOs from 2 PCs. Do you know if it is possible? Can I use shared variables? I would like to access any CompactRIO from any PCs, but I am not interested in communicate CompactRIOs between themselves and PCs between themselves.

 

   I have created a project (LV 8.6) with "My computer" and 3 CompactRIO's, all of them in the same subnet. I have created a library which contains all the shared variables. This library remains on the host PC ("my computer").The first PC has an IP = 172.16.4.51, and the second one, 172.16.4.52.

 

   Is there any way to access from both PCs (not at the same time) to any CompactRIO? I'm simulating both PCs by changing the IP of the engineering station (which is actually, one of PCs) and I notice that if I configure 172.16.4.51, I build and deploy the application, shared variables works only when the IP of the PC is 172.16.4.51. When I change the IP to x.x.x.52, shared variables don't work and the host PC application does not communicate to the CompactRIO.

 

   Can you help me?

 

Thank you in advance,

Best Regards.

0 Kudos
Message 1 of 3
(2,655 Views)

You can use shared variables to communicate with all the nodes in the system.

 

Your simulation is not going to work. As I understand, you are hosting the shared variable engine (SVE) on the first PC (IP 51). If you were not simulating, you could create shared variables on the second PC (IP 52), and bind those shared variables to the ones on the first PC. Right now, you are just changing the IP of the first PC on the fly, which I believe confuses the SVE. You will need to re-deploy the shared variables on the first PC, if you want the communication to keep working. When you have all systems in place, your architecture should work. I would recommend going through the following article to get a better understanding of the shared variable architecture:

Using the LabVIEW Shared Variable

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 3
(2,647 Views)

Hello Adnan:

 

   Thank you for your answer. After writing this thread, I kept on working, and I found a solution, which I don't know if is better or worse than yours. I have divided the library of shared variables in three ones (the number of compacRIOs). Each library has the shared variables related to the communication between the PC (51or 52) and each compactRIO. And each library is located on the targets (CRIO 1, CRIO 2, CRIO 3), and it works. I have tried to change the IP Address of the PC, then I reboot it and when I launch the host PC application it works. It has been always the same PC, but running the same application, with different IP.

 

   In the final project,we will have two PCs (51 and 52), and the host PC application must run on both computers, but not at the same time. That's the reason I didn't want to connect PC1 and PC2 via shared variables, datasockets, or any other way.

 

   I don't know if I found the best solution, but it works 🙂 

 

   If you think that there is a better or more efficient way to do it, please, tell me and I'll try to implement it.

 

   By the way, Do you know the slogan of engineer? We say, if it works, don't change it! 😄

 

   Thank you again and best regards

 

 

 

Alfonso Zarza

0 Kudos
Message 3 of 3
(2,615 Views)