05-31-2016 11:41 AM
I have some data written down on a labview of a PC (like a person's name, surname, age......) and using the TCP connection I'd like to send it over to another labview. I've made identical interfaces in both, where I want to display all the details in the corresponding strings/numbers. How can I do that? I can send one data string, but more than one I don't know, and in a way that it's displayed in the same way...I've tried using concatenate string and sending that but it doesn't work either.
05-31-2016 11:47 AM
I recommend you take a look at the STM library. This article might give you some good ideas: Command-based Communication Using Simple TCP/IP Messaging
05-31-2016 03:33 PM
Thanks!! But I was thinking more about using a TCP connection? I can send a single array, but if I try to send a cluster array, where I have all the data of the person (name and so on), it gives error. I try to concanate strings, but after on the receiver i can't unconcanate it in separate parts...
05-31-2016 03:48 PM
What error do you get? Can you show the code you currently have?
05-31-2016 05:07 PM
Here I send them. I'm tried to do with an array otherwise but when the connection is done the receiver can't decode the message.... I've also tried putting one string with concanate string but then the receiver gets all the words togehter. I need "name" and "surname" to be separate, but if possible, to be sent at the same time.
05-31-2016 07:17 PM - edited 05-31-2016 07:17 PM
Use Flatten To String on the sender side and Unflatten From String on the reciever. By default, these as the string length to the data so that the unflatten side knows how many bytes to use for the string. If you have a cluster, you can just wire the cluster straight into them as well.
06-01-2016 02:06 AM
Thanks! I understand, I think. But I've tried to apply it and it still gives me an error. Maybe it has something to do with the amount of bytes transferred? It tells me"error 74 has ocurredt unflatten from string" (memory or data structure corrupted).
06-01-2016 07:02 AM
In your Client VI, you did not wire up the actual data to the second TCP Write. Therefore your data is not being sent.
06-01-2016 05:14 PM
Thaanks! I hadn't wired it up because if I did it would give me error, but I've found out where was the mistaken and I've corrected it.
01-13-2025 01:56 AM
Hi to everybody,
I used this tecnique to send data over TCP, and using different data types on the same transmission, I packed data with concatenate string using a comma between data, just to separate them after receiving.
my problem now it is that same binary data, in the conversion, contain just a comma.
I'm thinking to replace commas into the data with some special char.
What Jolly do you me suggest to use?
Or any other idea you have to solve the problem.