LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Network Shared Variable wiring topology question

Solved!
Go to solution

Hey Bob, 

 

I have been away for a while and wanted to ask you a bit about how you implement Network Streams. 

 

Typically when using NSVs we have a housekeeping loop  that gets the most updated data and passes it to the faster speed loops through Local Variables. 

rkmadse_0-1619551763780.png

So the above picture is the housekeeping loop, and the loops below this handle all of the work. 

 

If you are using a network stream and you have to handle all these different types of data crossing over from Host to RT, how do you do that? Do you cluster it all? Do you have a stream per each set of controls? 

 

Thanks!

0 Kudos
Message 11 of 12
(203 Views)

I use the TCP/IP API instead of Network Streams, but the concepts here are the same.  What I do is write a string containing 1) the message ID (typically a string stating what the value is) and 2) the flattened data (use Flatten To String for most data types, strings don't need flattened).  If using a string for the ID, use some type of delimiter, typically a colon, to separate the id from the data and use Match Pattern to get the two values.  You can then use a case structure on the ID string to process each id as needed.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 12
(192 Views)