01-20-2005 08:48 AM
01-20-2005 10:02 AM
01-20-2005 10:18 AM
01-20-2005 10:56 AM
02-04-2007 09:55 AM
Hi,
Did anyone solve this issue? I'm using Labview 8.2 and at some point my program goes out of sync. my program has a client and a server ( at the moment both are on the same computer). the client sends stuff to the server, waits for answer, sends more, reads answer. etc. When in debug mode everything works fine. When it's not in debug or highlight mode, at some point a TCPread times out. I haven't tried removing subvi's because the block diagram will look terrible.
Does anyone have any ideas? Is there an option to listen for an answer on an existing connection? TCP listen creates a new connection.
Thanks a lot!
Danielle
02-04-2007 10:52 AM
Hi,
I tried bringing all the subvi's into the main vi and it works now... still, does anyone have a more elegant solution?
Thanks,
Danielle
02-05-2007 03:35 AM
02-05-2007 07:04 AM
Well, I'll have to live with a giant block diagram then... I don't have the time to implement TCP/IP in C (and I think that for my simple program it would be pointless anyway).
Thanks for the feedback!
Danielle
02-05-2007 07:31 AM - edited 02-05-2007 07:31 AM
@dsavir wrote:
Well, I'll have to live with a giant block diagram then... I don't have the time to implement TCP/IP in C (and I think that for my simple program it would be pointless anyway).
Thanks for the feedback!
I have developed quite serious LabVIEW applications in the past using TCP/IP both communicating in between LabVIEW applications as to other third party applications and I always got them working reliable.
TCP/IP is however a bit special in certain ways in comparison to other LabVIEW functions. Due to the nature of the communication happening you can't just use the error cluster without some consideration (but certainly can't leave it out at all as that will create domino errors in your communication too). I have found that timeout errors in the TCP/IP function are usually not so much a real error as much more just an indication that the remote side had some timing problem and that retrying in such cases often helps.
Also in order to get a robust client server communication you have to sometimes build a certain restart architecture in place. For instance a timeout would mean retry at first and if still error, close the connection and reopen. Sometimes in dynamic networks I have found the nodes refreshing the TCP/IP address and that left TCP/IP connections in a strange state. Reads always returned timeout, writes worked ok but the data never got transmitted. Closing and reopening the connection on such errors made it work again. Or using static IP addresses seemed to solve it too. Of course such a restart operation also requires at both sides proper detection of the "connection closed by peer" error and according reopen it there too.
Your giant diagram is likely not going to be a permanent solution as small changes to your diagram might change the timing and cause suddenly problems.
Rolf Kalbermatter
Message Edited by rolfk on 02-05-2007 02:33 PM
02-05-2007 02:37 PM