06-25-2015 06:50 AM
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.
Solved! Go to Solution.
06-25-2015 07:02 AM
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.
06-25-2015 07:07 AM
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...
06-25-2015 07:30 AM
Hi,
I have attached the vis. Please tell me the way how to solve it
06-25-2015 07:40 AM - edited 06-25-2015 07:42 AM
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.
06-25-2015 07:44 AM - edited 06-25-2015 07:51 AM
But Still error 74 is coming
06-25-2015 07:50 AM - edited 06-25-2015 07:50 AM
Changed the reference and Type cast to I32 .. but still giving as error ..
06-25-2015 07:57 AM
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).
06-25-2015 08:01 AM - edited 06-25-2015 08:03 AM
06-25-2015 08:04 AM
Still giving an error.. what more could be the reason.