LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you refresh html source?

Solved!
Go to solution

I'm using the VI below for accessing the internet and pulling data from certain websites. The problem is that when I run the VI, it doesn't automatically refresh the data from the websites, so I'm getting old data.  I tried using the "refresh" option, but couldn't get it to work without giving me an error.  I'm using LabView 7.1.

0 Kudos
Message 1 of 8
(3,287 Views)

Hello JFrakes,

 

Here is useful website with information on ActiveX internet web browsing. Attached on this page is an example that utilizes several control buttons including a refresh button.

 

ActiveX Internet Web Browser Using Event Structures in LabVIEW

https://decibel.ni.com/content/docs/DOC-19168

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,267 Views)

Paul-B,

 

I'm using LabView 7.1 and so it's not compatible with your VI. 

 

The VI I posted earlier has a method called, "refresh."  But when I wire it up, it gives me error code 97.  Maybe I'm wiring it wrong or need to put it in a loop?  Unfortunately, I can't figure it out.

 

Thanks,


JFrakes

0 Kudos
Message 3 of 8
(3,262 Views)

Hello JFrakes,

 

Here is a screen shot of the refresh event structure from LabVIEW 2011. You can try to replicate this or structure your refresh button around this example.

 

Hope this helps.

 

Refresh Button.PNG

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,231 Views)

That helped.  But I had to add the time delay of three seconds in each frame of the sequence structure to prevent the error.  It refreshes the page each iteration, but after a series of 800 URLs, it takes nearly five hours to run.

 

Sequence Refresh.PNG

0 Kudos
Message 5 of 8
(3,213 Views)

Hello JFrakes,

 

Here is an example screen shot for a custom URL.

 

Hope this helps.

Go.PNG

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,191 Views)
Solution
Accepted by topic author JFrakes

I finally solved the problem.  You need include a while loop to measure ready state before and after the refresh command.  

 

Ready State 2.png

0 Kudos
Message 7 of 8
(3,172 Views)

Taking from that example, can you explain what's happening with the refresh timing here?

 

How can I make it smoother without using timed or parallel loops?

 

If I leave a web browser open on my desktop it refreshes without drawing a blank (i.e. just the changes are updated rather than the whole page). Is that possible? 

 

Many thanks

Graham   

  

0 Kudos
Message 8 of 8
(2,124 Views)