04-06-2012 05:55 AM
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
Solved! Go to Solution.
04-06-2012 09:04 AM
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.
04-07-2012 02:12 PM
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.
04-10-2012 04:16 AM - edited 04-10-2012 04:18 AM
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
04-10-2012 05:41 AM
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.