From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,452 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,440 Views)

@Mark_Yedinak wrote:

Network streams will accept any data type.


... except classes.

0 Kudos
Message 3 of 6
(2,432 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,429 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,424 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

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 6 of 6
(2,415 Views)