LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 66 and error 18500 using HTTP GET control: SOLVED

Hello, I'm new as a member and as a LabView user but I spent many hours trying to get the URL_Get_HTTP vi to play nicely with my code, and as a courtesy I thought I would post the problems I was having and the resolution(s).

 

First of all, I was receiving an Error 66 every time I would attempt to make a connection.  This implies that the server terminated the connection, but I knew that this was not the case as I could connect just fine in other manners (browsers, PHP, etc)...

 

1) I changed the "bytes to read" input of the "TCP Read" control residing in the middle of the "TCP Buffered Read.vi" from a constant of 1024 to 1.  I have not confirmed that this step is required and you may want to apply step #2 on its own. 

 

2) I stripped the Error 66 from the "URL Get HTTP Document.vi" inbetween the "TCP Buffered Read" control and the "TCP Read Stream" control.  You can do this by disconnecting the wire, adding a "Clear Error" control on that wire, or perhaps least offensively using my attached control which selectively removes only Error 66.  You should review my control before using it, as I am a new LabView user!  If you think this is "bad form" to strip and ignore an error I would completely agree, but I'm going to classify this as a bug in the control itself, and would also point out that the 4th post of the following thread concluded the same thing.

 

http://forums.ni.com/t5/LabVIEW/Can-t-read-page-containing-XML-using-GET-HTTP-Document/m-p/1191803#M... 

 

3) To this point the Error 66 is no longer showing up, but now Error 18500 is, which is labeled as "undocumented" which was not very helpful.  Most people will probably not suffer from this problem, but ultimately the cause was that my URL string ended in a carriage return.  The HTTP control does not appreciate this in any way, and a simple Trim on the string before sending it resolved this issue.

 

Anyway, good luck!

0 Kudos
Message 1 of 1
(2,584 Views)