取消
显示结果 
搜索替代 
您的意思是: 

read html

Could anyone tell me if its possible to use labview to scrape a web page to display desired data on a front pannel?  For instance scrapping weather conditions, share prices etc.  If anyone has an example of a code which does something like this would be great. 
Cheers
0 项奖励
1 条消息(共 11 条)
5,321 次查看
Hi Sniepsy,

there are standard TCP/IP functions in LabView. You can also use Datasocket-functions to retreive data like pictures etc...

Have you searched the forum? Or take a look at the examples of Labview!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
2 条消息(共 11 条)
5,310 次查看
Hello Sniepsy,
 
As GerdW alluded to, you could read the entire HTTP response from a web server using the TCP/IP functions in LabVIEW. There is an example of this here:
 
 
Of course, you'll have to parse the resulting string you want! 😉 You may also be able to use a web service (.NET or otherwise) to pull the information you want from the web. This sort of thing is common for stock quotes, etc. We have an example of doing this on our website as well, but there's probably fancier methods:
 
Invoking a .NET Web Service from LabVIEW
 
You could also just put an ActiveX container on your front panel with a web browser embedded. That would just show the whole thing without any programming or parsing at all.
 
Just some thoughts -- hope this helps!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 项奖励
3 条消息(共 11 条)
5,300 次查看
As Charlie mentioned, it sounds like the web browser ActiveX control might be the easiest thing for you. Here's a simple example:
0 项奖励
4 条消息(共 11 条)
5,292 次查看

If you emplos a .net web service let me know how this goes.  I have been curious about incorperating web services into labview for a while.  Actually parsing the webpage and reformating it into a new webpage (or simply removing the value you desire) is rather strait forward.  Take the original HTML code, (use tcp reads with an ip url) and simply parse the string for the desired value.  ie <weather><temp unit = 'F">90.0<\temp>....<weather> is a simple string which can be parsed with a <temp units = 'F'>%f<\temp> for example.  There are alot of web services which are interesting and I havent gotten around to wiring them up to a vi.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 项奖励
5 条消息(共 11 条)
5,285 次查看

I am only new at LabView so I apologies for my questions in advance. That’s for that simple VI smercurio_fc but I cant for the life of me figure out how you got the WebBrowser Control/ display on the front panel wired to the reference input of the invoke node. Can anyone help explain?  Furthermore, is there any way in labview to click on an icon such as this and get some help on where to find it in the pallet, because there is no quick help for it.

0 项奖励
6 条消息(共 11 条)
5,263 次查看
Forget that last post, I just foud it, but now my next question is how is it acting as a control? It seems to be just displaying the URL which is input. An explination would be most appreciated.
Cheers
0 项奖励
7 条消息(共 11 条)
5,261 次查看

To use activex components in Labview, drop an activeX container, right click and choose browse for the class.  In this case a microsoft browser is used but there are thousands of activeX components to do this with.  Yes its that simple.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 项奖励
8 条消息(共 11 条)
5,244 次查看
Sniepsy, I'm not sure, but was your question answered?
0 项奖励
9 条消息(共 11 条)
5,240 次查看
Hi, Yes questions is definately answered, but with every question and answer it has brought on a bunch more questions, such as logging into secure sites. I have posted another question about this because i have worked through the online discussion about auto logon but cant get it to work with my online bank at https://www.national.com.au/cgi-bin/nolt/nolt_1.pl  .  If any of you can take a look at my code and give me some insite would be great.

Regards
0 项奖励
10 条消息(共 11 条)
5,227 次查看