LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to read some XML data from temperature logger over my network. I'm using LabView version 2009 sp1. I'm using the URL Get Document Vi. It works fine when using Internet sites like google or foxnews etc...

I'm trying to read some XML data from temperature logger over my network.  I'm using LabView version 2009 sp1.  I'm using the URL Get Document Vi.  It works fine when using Internet sites like google or foxnews etc...

When I use it with my temperature logger most of the time I get an Error 66...but some times it does work and actually retrieves the document. 

 

I can use the same address "http://172.22.21.68/XMLfeed.rb" (Internet Explorer or Google Chrome) in my browser and get a response every time.  When accessing from my browser the server in the temperature logger does take around 6 seconds to respond, but it does respond every time. 

 

Is the URL Get Document Vi exceeding a timeout?  If so, where can I set it to wait longer?

0 Kudos
Message 1 of 5
(2,769 Views)

There is a timeout buried in URL Get Document VI, it's default is 60 sec.  I had a similar problem when fetching XML data from a home energy monitor.  I never found a solution, and simply ignored the error, and would try again when it failed.  I found that even though it would time out, the data had been retrieved, so I assume there is some sort of end of file marker that was not properly implemented by the energy monitor's manufacturer (or perhaps in the URL Get Document VI).

0 Kudos
Message 2 of 5
(2,716 Views)

Thank you so much for the reply.  It sounds like there may be no easy fix.  If my browser can retrieve the data then I guess it points to the LabView URL Get Document VI.  The thing that botheres me the most is that it does work sometimes...maybe 1 out of 15 attempts.

 

I think I might try to find where the error is occuring and ignore it as you did.  I will post back if I have any luck 🙂  Thank you again!

0 Kudos
Message 3 of 5
(2,706 Views)

It's looking like I won't be able to beat this one.  When I drill down into the VI's, specifically the TCP Buffered Read VI where the error is occurring, the VI seems to be locked and I can't add the code to ignore the error.  I may just have to retrieve the data with another language then have my LabView code read it from a file, that seems to work.  I just wanted to try and keep it all in LabView.

0 Kudos
Message 4 of 5
(2,694 Views)

It looks like the TCP Buffered Read has a 2.5 sec timeout, I believe that is where I had trouble as well.  Try creating your own URL Get HTTP Doc vi in which you call URL Get Document in normal mode, with an appropriate number of characters to fetch (enough characters so that you capture all the important data in the XML file).

 

0 Kudos
Message 5 of 5
(2,679 Views)