LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending and receiving bytes using 2 separate VIs

Solved!
Go to solution

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

 

Smiley Wink

 

0 Kudos
Message 1 of 6
(2,526 Views)

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.

=====================
LabVIEW 2012


Message 2 of 6
(2,523 Views)

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 

Applications Engineer
National Instruments
Download All
Message 3 of 6
(2,491 Views)
Solution
Accepted by topic author winniewanda

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.

=====================
LabVIEW 2012


Download All
Message 4 of 6
(2,478 Views)

thank you for responding so quick. I will defenitly look into queues.

 

:womanhappy:

0 Kudos
Message 5 of 6
(2,464 Views)

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


Message 6 of 6
(2,452 Views)