Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   TCP Error reporting (http://www.chiefdelphi.com/forums/showthread.php?t=104696)

DominickC 16-03-2012 15:31

TCP Error reporting
 
1 Attachment(s)
Hello -

I've gotten TCP communication within LabView down, for the most part. I'm just trying to figure out a way to execute a sub-VI after about a second of not receiving any packets. Here's how I thought it could work.

After the TCP listener gets a TCP packet from the IP+port it's listening onto, it primes/activates the safety code. This code watches and sees if there are no packets coming in, and if none come in for around a second, a sub-VI is executed.

Any ideas/suggestions? Thanks.

Greg McKaskle 16-03-2012 21:07

Re: TCP Error reporting
 
I believe what you want to do is to set the timeout on the TCP read to 1500. Then wire the error out to a switch statement. If you don't get an error, cast the string as shown in your attachment. If you get an error, specifically an error 56, then call the subVI.

Greg McKaskle

DominickC 17-03-2012 00:25

Re: TCP Error reporting
 
Should I be worried that LabView might throw error 66 before error 56? Or should I just provide a sub-VI for both errors?

Greg McKaskle 17-03-2012 09:16

Re: TCP Error reporting
 
I think that 66 means that the refnum isn't valid because the other side closed the connection. In that case, I usually close my refnum and reopen the session.

Greg McKaskle


All times are GMT -5. The time now is 11:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi