OCCRA
Go to Post I would be kinda creeped out if I was one of the "famous" FIRST people. Why? Because no one is any different than anyone else in my eyes. Granted, some people stand out more, but that is because the other people might not have gotten a chance yet to shine. - Melissa Nute [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-16-2012, 02:31 PM
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
TCP Error reporting

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.
Attached Thumbnails
Click image for larger version

Name:	TCP.PNG
Views:	21
Size:	23.5 KB
ID:	12329  
Reply With Quote
  #2   Spotlight this post!  
Unread 03-16-2012, 08:07 PM
Greg McKaskle Greg McKaskle is offline
Registered User
no team (Team NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 3,952
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #3   Spotlight this post!  
Unread 03-16-2012, 11:25 PM
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 03-17-2012, 08:16 AM
Greg McKaskle Greg McKaskle is offline
Registered User
no team (Team NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 3,952
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:42 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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