05-12-2016 04:52 AM
Hi
I have a code which takes thermocouple temperatures from a DAQ every 5 minutes and also takes weather data from this website at the same time: http://willowsweather.1066.net
It writes all of the data to a TDMS file. The only problem is that occasionally, and seemingly randomly, I get this error code which stops the writing to TDMS
I'm not sure what's causing the problem so any suggestions would really help, it works fine most of the time and I have previously reached TDMS file sizes of 2600kb before the error is produced so I don't know what causes it...
Thanks
Joe
05-12-2016 09:06 AM - edited 05-12-2016 09:06 AM
Hi Joe,
I don't know what causes it...
Well, then it's time to start debugging!
And the error source is named in the error dialog box, you just need to read it.
And handling the error (apart from just displaying annoying dialog boxes) would be a good idea too!
05-12-2016 09:29 AM
05-13-2016 03:48 AM
Hi,
Here is the code. I didn't write this code but one of the first things I did when I started using LabVIEW was try to annotate it, so a lot of the annotations need updating as they are incorrect!
Pool Measurement System is the main VI. On the block diagram, go to the "Take All Readings" case, then the blue coloured Weather Data VI. This is a messy VI, sorry! The error is then occurring inside the white Read Website VI.
The URL http://willowsweather.1066.net/ is shown in the code, if you can suggest a better way of accessing this website through LabVIEW code then please do! This is my only experience of taking data from a website with LabVIEW and is the only part of this project/VI that was written by me.
The website is actually operated by a weather enthusiast who I have not been in contact with, so of course one option could be down time on his site. I have checked this out using a connectivity monitor and everything seems OK on his end for now.
Thanks for your help,
Joe
05-13-2016 04:08 AM
Hi
The error seems to be generated by the reading the HTML data from the website. Maybe your reading the data too fast, before the website responds, give a delay.
Other ways of reading data from a website would to use HTTP client toolkit.
(the vi ICON was nice)
regards
V.Senthil
05-13-2016 07:12 AM
05-17-2016 03:40 AM
Hi,
Recently I have been busy so I can't update the means of taking the website data, but thank you that is a good idea. I tried to run another scan and it ran for a few days, then received error 56 - the network operation exceeded the user-specified time limit. I think that your suggestion of giving a delay will solve this issue.
Thank you for your help, when I have the time I will update things and get back to you :)!
Joe
05-17-2016 09:48 AM
05-27-2016 07:56 AM
Hi,
I had a chance to make some updates, I did as you suggested and included an error handler which will retry if Error 56 or 1184 occurs. It has been running a scan for about 4 days now with no problems! After a 3rd failed attempt the program will terminate because after that long it probably means our connection is down.
Thank you both for your help!
Joe