LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read multiple strings with tcp

Hi,
I am trying to read multiple strings of data over TCP, and am struggling to determine which string goes where.  What I have it 4 strings, one with some flag information, and three with waveform data points.  I need to read the first string to determine if an event occured, and if one did, take the waveform points and input them into three seperate graphs.  Can anyone tell me how to distinguish the data?

Thanks,
Brendan
0 Kudos
Message 1 of 2
(2,454 Views)

You could either start your TCP communication string with a numeric that tells hows many substrings are included (I assume you concatenate the strings on the write side first, and sent them as one large string?), or you could put a special parse char in the string (again assuming a pre-send concatenate.

 

either way, you could use an array of the references to the three graphs, and run through a loop that parses the data and sends it (one plot at atime) to the approporiate graph.

 

The alternative is to open a seperate TCP/IP session for each graph. 

 

Let me know if you have any questions

Joel

0 Kudos
Message 2 of 2
(2,420 Views)