Hi,
I want to send cluster though
I want to send cluster though tcp which consists of strings , dbl, timestamp. I am getting an error while reading from TCP.
while writing I have used the string length and concatenated the cluster value changed to string using flatten to string.
While reading I am getting an error that Labview data is corrupt. While reading first I tried to get the length and then tried to convert the string using unflaten from string.
Can anyone help me regarding the same.
已解决! 转到解答。
There are examples in LabVIEW and across the forums for how to do this.
We won't be able to help you in your particular case because you only gave us a quick description and are leaving it up to our imaginations to figure out how you might have actually programmed it.
Try attaching your VI if you want to get help.
Hi riyak,
This error occur moslty if you have wrong datatype during unflaten from string.
Please make sure you use same datatype at both flatten to string and unflatten from string end.
Please post you code for better solution...
In your RX VI, you are type casting the TCP reference to an I32 when you should be type casting the string from the fist read.
Edit: Just noticed that you are also type casting to an U16 when it should be an I32.
And the other stupid thing that was missed: you have to tell the first TCP Read to read 4 bytes (the length of an I32).