取消
显示结果 
搜索替代 
您的意思是: 

tcp

已解决!
转到解答

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. 

0 项奖励
1 条消息(共 12 条)
5,253 次查看

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.

0 项奖励
2 条消息(共 12 条)
5,236 次查看

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...

 

0 项奖励
3 条消息(共 12 条)
5,229 次查看

Hi,

I have attached the vis. Please tell me the way how to solve it

下载全部
0 项奖励
4 条消息(共 12 条)
5,218 次查看

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.



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 项奖励
5 条消息(共 12 条)
5,209 次查看

But Still error  74 is coming

0 项奖励
6 条消息(共 12 条)
5,201 次查看

Changed the reference and Type cast to I32 .. but still giving as error ..

0 项奖励
7 条消息(共 12 条)
5,197 次查看
解答
接受人 Reshu

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).



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
8 条消息(共 12 条)
5,186 次查看
破坏者
 

 

0 项奖励
9 条消息(共 12 条)
5,182 次查看

Still giving an error.. what more could be the reason. 

0 项奖励
10 条消息(共 12 条)
5,174 次查看