CodeSys Webvisu Refresh, Dynamic Image?

Kidder

Member
Join Date
Jan 2019
Location
Tucson
Posts
4
How can I trigger the web browser to refresh based on a variable? ie when I receive a new image have FF / Chrome refresh.

What I'm trying to do is display a new image from a vision system in the webvisu. The only way I found so far is to delete the original the image from the image pool in the visu folder, then name the new image what the old image name was and then refresh the browser.

It's not the best solution but I can't figure out a way to dynamically change the image pool properly.

I've also tried using the webbrowser element and just change the link to the displayed image but for some reason when using the webbrowser element the popup keyboard inputs start messing up.
 
Is this an issue with the browser caching the image?

If so, you usually add a date parameter or any random number to the end of the image name. You can see this anytime there is a ?= after the file extension.
 
I guess browser caching the image is possible but I have the image pool set to "reload the file automatically" when it changes.

Not sure how to add "?=xxx" to the image pool on the fly.

I've also tried with two images in the pool. So display image 1 and the switch to image 2 (which works) then change image 1 to the updated image and then switch back to image 1 but the old image is still displayed.
 
I have no experience with Webvisu, but I use a macro in excel that saves graphs and charts as an image to an image folder in IIS. The webpage will refresh images based on a polling timer. I went all around trying to figure out why the images wouldn’t update. Turns out the browser was caching the images, I tried every no cache code on the HTML and JavaScript side and nothing worked. I stumbled on a thread about adding a parameter to the end of the image name and it worked after that.
 
Thanks for the suggestions. I finally figured it out.

By putting the image pool in the bitmap ID variable, ie Image_Pool.1, then copying the new image to replace the Image_Pool.1 original image, and then incrementing an int in the dynamic bitmap variable it now changes the image without having to refresh the browser.
 

Similar Topics

Hi guys Using somachine 4.1 sp1. When i run the web vizu in chrome i get an error that your browser doesn't support html5 canvas. Even though this...
Replies
2
Views
3,713
Hi all! So I am still playing around with my home made sprinkler system. This one. The communication keeps dropping, and I think that might be...
Replies
2
Views
5,042
Hello, I am new to Codesys, and am trying to learn about it for a project we're developing. I've got a couple questions, but first a little...
Replies
1
Views
72
Hi everyone, as this is my first experience with Rockwell Software i would like to know what's the best way to make Enumerations?
Replies
10
Views
412
I am trying to get Codesys to work with a couple of Moxa ioLogik E1200 series DIO devices (E1210 and E1211). I am able to write to the E1211 DOs...
Replies
2
Views
113
Back
Top Bottom