LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know of problems passing tcp network connection refnums to sub VIs in LabVIEW 7.1?



@mattypiper wrote:
rolfk,

Can you post an image or VI of an example of this robust TCP/IP communication you are describing?  You have a very good understanding of the nature of TCP/IP comm and I'm sure this lesson learned could be used in other comm protocols as well.   \

I am interested to see an example of the error-handling architecture you have implemented.  The scenario "Timeout, Retry, Timeout again, Close connection, Open connection, Retry, Success"  is probably very common and a great way of dealing with undetermined network latency.

Cheers,
--Matt


That are typically libraries contained in rather huge applications (usually some 600 to 800 Vis). Stripping out the relevant part is not something to do in a matter of a few minutes and I would want to do some other stuff at the moment.

However a very good starting point "robust TCP/IP" on www.labuseful.com. This is already a very reliable 24/7 TCP/IP connect, disconnect, reconnect VI set using some if not all of above recommendations somehow. Jack Hamilton is an old time LabVIEWer and has created great software.

Rolf Kalbermatter
 

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 13
(690 Views)
Don't forget that VISA supports a connection string for TCP. I have found that VISA TCP communication is a little bit more reliable, although I am just doing instrument communication and not anything complicated like a server. In the help file for VISA TCP they mention an option called the Nagle algorithm which collects TCP writes until there is enough data to fill a packet. If the TCP functions are doing this to the writes then perhaps thats why things go out of sync. TCP is the connection based protocol and can reconstruct large messages. IP is the connectionless protocol much better suited to sending small bits of data but you have to write your own handshake.
Preview Post
0 Kudos
Message 12 of 13
(683 Views)
Actually IP is the underlying protocol for both TCP and UDP and quite a few other protocols. An application basically never operates on IP level. What you probably meant was that TCP is the connection oriented protocol while UDP is the connectionless protocol.
 
As far as TCP over VISA is concerned: I have in a far away past tried to use that for communication between applications because there was an option that these could either be connected by serial or network together. I had far more troubles by this than it did solve, with rare situations where connections seemed still alive but data somehow disappeared so I abandoned that approach. I'm sure TCP over VISA has undergone quite some revision chances since and may work better even for such situations but it is an additional layer complicating the already complicated stack of protocol and interface layers even more.
 
Rolf Kalbermatter

Message Edited by rolfk on 02-06-2007 09:49 AM

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 13
(675 Views)