01-19-2017 08:34 AM
I have one Vi in one computer and I want that when I press run, my vi runs and then it automatically run another vi in a different computer and come back to the previous Vi. Is that possible?
How could I do that?
01-19-2017 08:43 AM
Hi lcf,
I have one Vi in one computer and I want that when I press run, my vi runs and then it automatically run another vi in a different computer and come back to the previous Vi. Is that possible?
No.
If it would possible you would create a computer virus… 😄
How could I do that?
Check the examples coming with LabVIEW. Especially those for UDP or TCP server/clients!
When you want some communication between two computers then you need to run an executable on both computers, at the same time: one would be the server, the other the client…
01-19-2017
08:45 AM
- last edited on
04-14-2025
03:23 PM
by
Content Cleaner
There are two options.
The more recommended way is to implement a communication interface between the applications calling these VIs. This would require you to implement some TCP/UDP interaction or you download libraries for this (e.g. STM).
The other option is using VI Server. Use Open Application Reference to get connection to the other LV environment/runtime.
Please note that you have to potentially configure the firewall on both PCs for it to work.
01-19-2017 08:53 AM
Do you have any exmples of how could I do it using VI server?
01-19-2017
09:02 AM
- last edited on
04-14-2025
03:26 PM
by
Content Cleaner
I dont have an example at hand right now. Anyhow, this is part of the LV help and should help you out.
01-19-2017 09:50 AM
Confirming Norbert's suggstion about VI Server.
That approach has been avaliable going back to LV 6i. At that time it was bit more more and all you needed to do was enable VI serving on the raget machine and then knowing the path to the VI you wanted to invoke. It was THE method that was taught in early RT courses.
Since then it has been complicated by firewalls, Projects, and VI Server access lists...
I have use that approach many times ove the years becuase once you get it figured out, it abstracts away the connection and protocol complications and lets me focus on the high-level ineractions.
After the coonection is made, we need only use "Invoke Node Call by reference" to the VI we want to invoke on the target machine.
It is a elegant approach if you invoke an Action Engine on the targt machine which if properly coded, will prevent race conditions across networks with multiple nodes. I have used it to access litteraly hundreds of target machines.
There are only two draw-backs that come to mind associated with VI Server.
1) There are some that think that the VI Server appraoch is a security risk. I have built-in security checks to prevent issues in the applications that warrented the extra check.
2) The data is transfered to and from the CBR using the UI Thread so if there are large data sets being passed or recieved from, the remote machine then plan for the UI thread to be hit durring the calls.
This tag cloud has some links associated with VI server if you want to read beyond the notes in the link Norbert offered.
Ben