![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Jan 2019
Location: Tucson
Posts: 4
|
CodeSys Webvisu Refresh, Dynamic Image?
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. |
![]() |
![]() |
#2 |
Member
![]() ![]() Join Date: Mar 2011
Location: Atlanta
Posts: 508
|
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. |
![]() |
![]() |
#3 |
Member
![]() ![]() Join Date: Jan 2019
Location: Tucson
Posts: 4
|
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. |
![]() |
![]() |
#4 |
Member
![]() ![]() Join Date: Mar 2011
Location: Atlanta
Posts: 508
|
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.
|
![]() |
![]() |
#5 |
Member
|
there is a setting for this, please use the PLC as browser.
__________________
shooter@home.nl skype shooter paul.deelen Computer Shooter Paul Deelen ![]() J. Wassenaerstraat 29 NL 5224 GG 's-Hertogenbosch +31653300739 |
![]() |
![]() |
#6 |
Member
![]() ![]() Join Date: Jan 2019
Location: Tucson
Posts: 4
|
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. |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Codesys dynamic text list | dbozic | LIVE PLC Questions And Answers | 3 | September 16th, 2018 04:48 PM |
Codesys FTP camera image and display | cltoh77 | LIVE PLC Questions And Answers | 0 | January 4th, 2016 12:43 PM |
Codesys Visualization...Rotate Image | jonfarrugia | LIVE PLC Questions And Answers | 1 | December 30th, 2015 04:21 PM |
CodeSys Webvisu | boneless | LIVE PLC Questions And Answers | 2 | July 27th, 2015 10:13 AM |
How to switch drivers | lbeh | LIVE PLC Questions And Answers | 7 | December 11th, 2014 03:11 PM |