Labview tcp error 66



LabVIEW

TCP error 66

TCP error 66

‎04-13-2009 12:47 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

I am currently trying to read from a RFID Reader application known as TAVIS. It has a TCP/IP address (192.168.1.1) with a port at 6700.

Attached is a simple Vi that i have made to read from that port. I could get readings from that port successfully. However, after taking approx 6-8 readings of 60Bytes of data, the program crashes with an error 66. (error attached). I would need that this VI take active readings off the port continueously.

Kindly advice on how i can rectify this problem.

Thanks a lot guys.

Re: TCP error 66

‎04-13-2009 01:27 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

search the forum with that error code you will find lot of discussions. Post back if your problem is still persisting.

Re: TCP error 66

‎04-13-2009 02:13 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

I did already check the forum for this error before i post this. However, most of them post with regards to other issues, and seems to rectify it by solving other unrelated issues in their VI.

Anyway, there was 1 of them which states to «remove the while loop». I dun get what he meant by that, as i do need the while loop to continuously attain/read data from the specified port of my RFID Reader TAVIS application.

Thanks for your suggestions. Kindly advice further

Источник

LabVIEW

TCP Read does not detect network conncetion closed error (66)

TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 12:28 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Instead of LAN i am using WLAN to connect PC and mobile. All communication read and write operations are performing ok. But the only problem i am facing is that once i disconnect network connection from mobile my labview TCP read operation does not detect it and only timesout at its specified interval. Although for Bluetooth network connection if i disconnect from mobile then BT read detects it as network conncetion closed by peer error (66).

Can someone help me on this.

Re: TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 03:57 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

please post some example code showing why this is an issue for you.

TCP Read tries to read from the session. It does not check if the session is still valid; this has to be done using error handling.

An example is shown in the «TCP Communicator — Active.vi» in the loop in the bottom: It checks for time out in order to cancel communication attempts.

You would extend this example to try a reconnect to the server. Of course, the server itself has to «rearm» itself first.

hope this helps,

Re: TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 09:17 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Hi Dear Norbert,

Thanks for reply. I am doing the error handling like the same way and terminating the while loop for TCP Read but the problem is that my TCP Read only gives timesout (56) error. Even if i close the connection of WLAN from mobile during that timeout period. It closes still after timeout period. Whereas same was not in case of BT.

Читайте также:  Loadlibrary failed with error 1114 windows 10 archicad

I think may be it is due to the reason that Labview has drivers for BT whereas for WLAN/LAN it uses general TCP protocols.

Have you disconnected the Connection before the timeout period expiers? And you used LAN or WLAN?

Re: TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 09:42 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

that’s what was indicating: you have to check for time outs as well and react as desired (for your application).

I have not tested WLAN yet, so i cannot give any comment of wether loosing the connection should result in time out (56) vs. connection closed (66) is ok or not.

Re: TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 11:51 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

OK, then for LAN when did you get connection closed (66) error? Is it by just unplugging the LAN cable and during that also time out period is not over, then 66 error is prompted.

Re: TCP Read does not detect network conncetion closed error (66)

‎07-18-2011 05:17 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

The behavior that you are seeing is expected for TCP protocal because the device will timeout while it is looking for the connection to close the connection. This Wikipedia article explains the way that TCP protocal works in relation to a four way handshaking procedure that TCP performs in order to close a connection. I hope this helps!

Re: TCP Read does not detect network conncetion closed error (66)

‎07-26-2011 03:11 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Hi Dear Norbert,

I am still waiting for your reply. Whats error you get once you unplug LAN cable? i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.Thanks

I studied your recommended article but which way Labview handles TCP close connection then. i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.

Re: TCP Read does not detect network conncetion closed error (66)

‎07-26-2011 04:01 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Hi Dear Norbert,

I am still waiting for your reply. Whats error you get once you unplug LAN cable? i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.Thanks

I studied your recommended article but which way Labview handles TCP close connection then. i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.

I have not tested it but more likely than not you would get an error 59 when the network cable is unplugged. Error 66 is for when the network is still up and you attempt to communicate on an established connection that has been closed by the other side. This is not an error that you will se from a TCP read very often.

Читайте также:  Internal exception io netty handler codec decoderexception java lang nullpointerexception

Also, please keep you related question in a single thread rather than starting multiple threads for the same topic.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

«Does anyone know where the love of God goes when the waves turn the minutes to hours?»
Wreck of the Edmund Fitzgerald — Gordon Lightfoot

Re: TCP Read does not detect network conncetion closed error (66)

‎07-26-2011 11:08 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

You can’t unless the other side of the connection explicitly sends a TCP-RST or TCP-FIN. If neither of these are sent there is no way for the your TCP-Read to detect the connection has been closed. This is not an issue with LabVIEW but how the TCP protocol works

But for the Bluetooth VIs if i disconnect BT connection from mobile during read timeout interval, then it does give me 66 error and quit the read process. So can we have thing like this for TCP VIs or its a limitation for TCP as its general purpose VIs not for specific network.

Re: TCP Read does not detect network conncetion closed error (66)

‎07-26-2011 11:19 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

I haven’t looked at the BT protocol that closely but within TCP you will generally not see this behavior. TCP is desigend to actually survive breaks in the network connection (such as a device switching APs in a wireless network or a break in the network somewhere between the two ends of the connection.) As such a connection can effectively be closed with no notification. If the all the data has been acknowledged between the two ends it is possible a connection can be silently closed. Therefore you need to wite your application such that it handles timeouts and can use these as an indication the connection has been closed. In addition, you can write the application layer to include messages that provide status information about the state of the connection and allow new TCP connections to be established in the event one gets closed.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

«Does anyone know where the love of God goes when the waves turn the minutes to hours?»
Wreck of the Edmund Fitzgerald — Gordon Lightfoot

Источник

Instrument Control (GPIB, Serial, VISA, IVI)

TCP Read block error 66 in LabView 2009

Re: TCP Read block error 66 in LabView 2009

‎07-02-2012 05:18 PM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

It sounds like we are able to write to the microcontroller- so that is good- but just not read. Let me know the results of the Simple Data Client.vi because that will tell us if we can get any data from the microcontroller using LabVIEW.

Re: TCP Read block error 66 in LabView 2009

‎07-03-2012 09:48 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

It says to run first Simple Data Server.vi then to run Simple Data Client.vi. I run both of them as it says for port 2055 and 2056, and address was localhost. It runs no problem. I tried to enter for port the number from default of VI Server 3363 then it showed error:” The specified network address is currently in use.”

Читайте также:  Error message in c language

Also I had one error 66 in Labview 8.6 when I was running short test that gives

10 rows of data.

I resolved this problem by changing the number of Bytes to Read for TCP Read block: it was 1024, I changed to 16. I understood that the Bytes to Read parameter is the minimum bytes to read. So if the file does not have this minimum the TCP Read block is showing the error.

I made same change on the computer with LabView2009. No errors at all. But the probe before TCP Read block shows warning 56 and the probe after this block shows warning 66, and still the data file is empty.

Источник

LabVIEW

Error 66 : TCP Read

Error 66 : TCP Read

‎02-26-2015 10:34 AM — edited ‎02-26-2015 10:36 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Hello to everyone,

I need to communicate with an automat to send it a stop information. This stop information is provide by various sensors that are communicating with Labview. My problem is when I launch my VI, it stopped after 30 seconds with the error code 66. You can see attached a screenshot of the error and my VI. This error only appears when I use a while loop, if I use the run continuously button the error does not appear.

As a beginner I really don’t know the origin of this error. I only know the fact that it can be linked to time respons between the automat and my computer.

Thanks in advance for your help

The model of the automat is a Pro-Face LM 4301

Re: Error 66 : TCP Read

‎02-26-2015 11:11 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

It looks like something is being constantly opened and closed. You really should not do that. You should initialize once before the loop and close once after the loop.

That error specifically states that the instrument has closed its connection. Are you doing something to tell it to disconnect?

Re: Error 66 : TCP Read

‎02-27-2015 01:57 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Thank you for your answer,

I’m working on my VI to initialize before and close after the loop.

For your second remark I don’t tell my automat to disconect, I just send it the number 2 wich means to stop the rotation of a brushless engine, but not to disconect the automat.

Re: Error 66 : TCP Read

‎02-27-2015 02:32 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

Sorry for the double post,

I try to initialize before and close after the loop and it look like it’s working. I make it run 10 minutes, so I supposed my problem is solved, thank you !

Re: Error 66 : TCP Read

‎08-18-2021 11:28 AM

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report to a Moderator

The code is written with an undergrad in our lab about 7 years ago. I have no knowledge or experience of LabVIEW.

I just performed some experiments with the machine, and suddenly got the ERROR-66 from nowhere.

The IT department check my PC and FPGA network connection and they confirmed that all good from that side. They said the error is becasue of the PC—FPGA connection.

Источник

Оцените статью
toolgir.ru
Adblock
detector