09-25-2013 11:44 AM
I've created a simple client that sends a string to a server. This works correctly but the TCP Write will only send this message once. I have to close my Client and restart it to have it send again. I've attached my client vi. Thank you in advance for your help.
09-25-2013 11:51 AM
What are you sending the data to? How do you know it only writes once? Are you getting an error after the first or the second time you do the TCP Write?
Is it possible the device on the other end is closing the TCP connection after receiving the first message?
09-25-2013 01:15 PM
I've attached the vi that I'm sending the data to. The second and third sequence has the server functions. This vi has other dependencies so it's only for viewing. I can see the data being received as the server displays the string. I don't get any errors when I run the client. I'm thinking that it is possible that the server may be closing the connection, though I don't see how.
09-25-2013 01:50 PM
A quick glance suggests the problem is the receiving side. After you receive one message, you go back to waiting for a new connection (TCP Listen) instead of looking for new data on the existing connection. The sending side keeps sending data, but the receiving side never reads it.
The receiver code should get cleaned up. The sequence structure is unnecessary, especially the frame that has nothing in it but wires!
09-25-2013 01:53 PM
Thank you nathand. Now I see what's going on. I will also clean up the sequence or eliminate it. I guess I can use the error braid to connect different items.