LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gathering data from a webpage

Hi, 

 

I was wondering if labview is able to access to a webpage  (below) to gather the data from the page and plot it into a graph. 

Screen Shot 2016-07-19 at 10.54.00 AM.png

0 Kudos
Message 1 of 5
(4,000 Views)
HTTP GET AND HTTP PUT options are availabe to read and write data from web page.
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(3,988 Views)

DataSocket was another method that worked mnay years ago...

 

Just open a connection and read from the URL.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(3,952 Views)

@S.Neo wrote:

Hi, 

 

I was wondering if labview is able to access to a webpage  (below) to gather the data from the page and plot it into a graph. 

Screen Shot 2016-07-19 at 10.54.00 AM.png


Yes but... It is a real pain in the you know what because you end up with a ton of text with HTML, Java Script, and anything else that goes into the webpage course that you have to parse through to get the information you are looking for.

 

Righ click on that webpage in your browser and pick "View Page Source" and take a look at the raw text you will have to parse your table out of.

 

It looks like you are attempting to communicate with a power analyzer, why not just talk directly to the power analyzer using SCPI commands like any other instrument?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(3,935 Views)

RTSLVU nailed it on the head. If you are talking to an instrument, then using SCPI commands, etc will be the best approach to get data from it directly. A lot of pre-made VIs for talking to instruments can be found on the instrument driver network: http://www.ni.com/downloads/instrument-drivers/

 

If you cannot find a good library then you may have to parse the page using HTTP Client VIs such as GET and POST as suggested by PalanivelT and RTSLVU. From the screenshot I would guess that page is doing AJAX requests to get information from the device (making small queries via GET to get well-formated data to update the web page). If that is the case then the following post I made for a different website shows an example of using the dev tools to figure out and emulate that request in LabVIEW: http://rajsite.com/2016/06/25/scraping-web-pages-in-labview.html


Milan
0 Kudos
Message 5 of 5
(3,882 Views)