LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO multiple Hosts

Solved!
Go to solution

Hi all,

 

is it possible to have a crio target running a central VI which exchanges data with host VIs running on different hosts?

 

Thanks a lot,

Harry

0 Kudos
Message 1 of 5
(3,749 Views)

Yes. I have a Crio system talking with 4 different computers on a private Ethernet bus. I use shared variables hosted on the Crio to pass information to each system. I created a set of variables for each system.

0 Kudos
Message 2 of 5
(3,746 Views)

Depending on what kind of data you want, you should not have to create a set of shared variables for each system you want to communicate with (this is not scalable).

 

Do you need lossless communication?  If not, you can create one set of shared variables and every host can read from the same variables.  You could also do a UDP multicast from the cRIO and have your hosts listen for the UDP communication.

 

If you need lossless communication between your target and hosts it will be more complicated.  The most scalable solution would probably be TCP communication.  Check out the example in the Example Finder for TCP server with mutliple clients.

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 3 of 5
(3,739 Views)

Hi Chris,

 

thanks for the reply.. I do not need lossless comms so I guess the shared variables option should be suitable. But what exactly do you mean?

 

I created a project and then within it a library containing a set of shared variables in my project (under the cRIO target). I then built several host VIs, each sharing some or all of these variables with the cRIO target.. I, obviously, can run host VI (A) from PC (A). However, with host VI (A) running, when I open the project in PC (B) and try to run host VI (B) from it, I get an error message saying

 

"Access denied: This target is already in use by another project or host computer."

 

Obviously the way I have defined my shared variables is incorrect, but why??

 

I have attached a snapshot of my project..

 

Thanks a lot for your time

Harry

0 Kudos
Message 4 of 5
(3,714 Views)
Solution
Accepted by topic author charmand79

You have to create an exe of the target code and deploy it in the target then run only the host codes on different computers. Make sure that you do not have any dependency of the Target code in your host code.The error you posted will occur only when you are already running a code on the target and if you are again trying to deploy the code in the same target from different computer.

-----

The best solution is the one you find it by yourself
Message 5 of 5
(3,708 Views)