11-15-2012 05:20 AM
Hello to all,
What i have already create is a web browser integrate into a VI project and from this i can read some values like temperature or humidity. Also i have put a HTML window in order to take this values and to export to a string (for example to check these values from the browser and to be able to see in separate constat). Can you help how to do this with an example??
Thanks in advance
11-15-2012 07:59 AM
What exactly are you doing?
Why are you using a web browser?
HTML code is a text, so I don't understand what you are trying to do.
11-15-2012 08:10 AM
What i am trying to do is to monitor and control a temperature sensor. To do that i can put an IP address of the sensor to the browser. So what i have already done is to integrate a browser to Labview project. What i am trying to do now is to see in the HTML text that is the name of the sensor and to export the value of this to a separate string like a constant.
11-15-2012 11:46 AM
Am I correctly understanding that you have embedded a web browser into your front panel, using ActiveX? If the HTML is simple, it may be easier to use DataSocket (or the Internet Toolkit, if you have it) to retrieve the raw HTML, then parsing out the parts that you need. If that's not an option, or the HTML is complex, it would help if you can provide your code, and a screenshot and the HTML source of the web page you're trying to read.
11-16-2012 04:40 AM
Below i have attached the code and the HTML code from the sensor. If you have to recommend anything it will be usefull for me. I have another problem now. If you see in the HTML code you will see that i have three different values to export(temperature, humidity and dewpoint) but all of them have the same regular expression in order to request in my code. Do you know how is it possible to solve this problem because always i take the same temperature value for three of them.
Thanks in advance
11-16-2012 10:20 AM
Why so complicated? You need make only one DataSocket request for the HTML, not three, and there's no need for the variant functions. Parse the HTML in a loop to get all three values as shown below. I haven't tested this because I'm not willing to retype the text from your JPG screenshot just to see if it works, but if it's not right it's at least pretty close.
11-19-2012 06:52 AM
Sorry but i cant see the picture. Is it possible to re-send again???
Thank you
11-19-2012 01:20 PM
Not sure why you can't see the picture, but here it is as an attachment.