LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network streams

Solved!
Go to solution

 

hello,

i want to send data periodically from a host to realtime targets via network streams. the data types delivered by the host are unfortunatly not scalar but rather: a cluster of enums, a cluster of different elements and two arrays of clusters. i was wondering if it works to have multiple streams (4 parallel streams) doing the job? 

thanks in advance   

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

Network streams will accept any data type.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 6
(2,815 Views)

@Mark_Yedinak wrote:

Network streams will accept any data type.


... except classes.

0 Kudos
Message 3 of 6
(2,807 Views)

thanks for the reply. but what about parallel streams? is it possible to establish multiple network streams (write) from the host to the same real time target?

0 Kudos
Message 4 of 6
(2,804 Views)

Yes, streams are named pipes. As long as each device provides an end point for the stream you can have multiple streams.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 6
(2,799 Views)
Solution
Accepted by topic author labviewette

Hi Labviewette,

 

As others have said, you *can* set up multiple streams for each data type if you want.

 

However, there is overhead that comes along with this and what happens if you need to add more data types?

How many streams will you end up needing?

 

I prefer to use one stream for writing and one for reading from the RT target.

The streams are configured as an array of 2 strings.

 

The first string defines the data type.

The second string is the desired data flattened to a string.

 

When data is received, just check the first string and feed it to a case statement where the data (from the second string) is "unflattened". 

 

This method has less network overhead and is extensible.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 6 of 6
(2,790 Views)