08-30-2011 09:17 PM
Hello
I am trying to use 2 labview windows on the same computer, one for transmitting data bytes and one for receiving data bytes.
Is there any special function in labview that will allow me to do this (communicate between these two VI)?
Since both transmitting and receiving VI are on the same computer I don't think I can use a RS 232 Or 485.
I have attached a picture to better explain what I am trying to do.
Please Advise.
thank you already for all your inputs
Solved! Go to Solution.
08-30-2011 09:23 PM
You can use TCP via localhost. But look into queues. Queues can be named and that might be easier to get your head around at first. If both applications will be separately built then you will have to use TCP. Other options are network streams or network published shared variables.
08-31-2011 12:46 PM
Hi Winniewanda,
All of the suggestions Steve made are good options. You may also consider using global variables. I have included two example vis from the example finder in labview that illustrate how to do this. If you search for TCP data client and TCP data server in the NI example finder you can also see examples on how to use tcp to communicate between vis.
Regards,
Josh Brown
08-31-2011 02:43 PM
Global variables are the simplest thing. But they are generally frowned upon because they tend to be used by new users for things which they are not appropriate for.
Here is an example of using a named queue to communicate between VIs. The example finder has an example of using queues over TCP. But newer versions of LabVIEW have network streams which is kind of the same thing.
08-31-2011 09:57 PM
thank you for responding so quick. I will defenitly look into queues.
:womanhappy:
09-01-2011 02:43 AM
Of Course, queues are much better for your purpose because they implies synchronization between your two process and guarantee integrity of your datas.
With variables, the problem is that you need to add a synchronisation algorithm, or you will read several times the same value without having been updated, or write it several times before it has been read and loose datas.
Olivier L. | Certified LabVIEW Developer