LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple example of Communicating Between the RT Target and Host

Hello,

 

I need help with comunication between the RT Target and Host. I don't understand well how to do this, and I wish knew how to do. Could anyone show me a simple example program to understand it please?

 

I have already see the NI formation and i have looked for examples in web but i don't understand clearily.

 

Thanks so much

0 Kudos
Message 1 of 7
(4,060 Views)

Hi Christina,

 

There are multiple methods to communicate between an RT target and a client/host pc. viz..

  1. network shared variables,
  2. TCP
  3. UDP
  4. Network streams etc.

if you are developing a relatively less complex or simple project or is just getting started , you could use shared variables.

There are examples for shared variables in Labview example finder. one such example is

C:\Program Files (x86)\National Instruments\LabVIEW 2016\examples\Data Communication\Shared Variable\Shared Variable.lvproj

 

For more complex systems i would prefer  using TCP or UDP.

 


cristina.lopez wrote:

I have already see the NI formation and i have looked for examples in web but i don't understand clearily.

 


which part are you finding it difficult to understand?

 

Regards

Deepu

 

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 2 of 7
(4,039 Views)

I have readen about 

  1. network shared variables,
  2. network streams

but i don't understand well when to use one or other solution. 

 

I'm going to see the examples that you said me.

0 Kudos
Message 3 of 7
(4,032 Views)

refer this one for network streams

C:\Program Files (x86)\National Instruments\LabVIEW 2016\examples\Data Communication\Network Stream\Network Streams.lvproj

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 4 of 7
(4,023 Views)

Here is a Good Rule of Thumb (arrived at from a few years of experience with LabVIEW RealTime using a PXI system -- Your Milage May Vary if you are using a different RT Platform) --

  1. Never use Network Shared Variables to communicate between processors.  Every time I have tried, I have regretted it (and removed the code).
  2. Network Streams are a simple, reliable, robust method for one-way transmission of data between two processors.

Within the last few months, there have been several posts about Network Streams on this Forum (I've contributed to several).  I believe there may be some example code out there ...

 

Bob Schor

0 Kudos
Message 5 of 7
(4,007 Views)

@cristina.lopez wrote:

I have readen about 

  1. network shared variables,
  2. network streams

but i don't understand well when to use one or other solution. 

 

I'm going to see the examples that you said me.


Use shared variables when you don't care about every value.  If the most recent value is good enough, great.

 

Use network streams if you have a need for one to one messaging.  For each message sent, it is received exactly once by the recipient.

0 Kudos
Message 6 of 7
(3,978 Views)

If you have money I suggest using DDS for LabVIEW from RTI

https://www.rti.com/products/dds/labview

 

This is an excellent third party add on, and can handle just about any-type of data exchange needs you can imagine. 

 

In many cases the money you pay for the license will be cheaper than any type of time you would place into creating your own solution.

 

 


Engineering - The art of applied creativity  ~Theo Sutton
Message 7 of 7
(3,968 Views)