You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 21st, 2019, 02:50 PM   #1
Kidder
Member
United States

Kidder is offline
 
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.
  Reply With Quote
Old June 21st, 2019, 03:42 PM   #2
Maxkling
Member
United States

Maxkling is offline
 
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.
  Reply With Quote
Old June 21st, 2019, 04:15 PM   #3
Kidder
Member
United States

Kidder is offline
 
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.
  Reply With Quote
Old June 21st, 2019, 09:51 PM   #4
Maxkling
Member
United States

Maxkling is offline
 
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.
  Reply With Quote
Old June 25th, 2019, 09:23 AM   #5
shooter
Member
Netherlands

shooter is offline
 
shooter's Avatar
 
Join Date: Sep 2002
Location: duketown
Posts: 2,711
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
  Reply With Quote
Old June 26th, 2019, 11:50 AM   #6
Kidder
Member
United States

Kidder is offline
 
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
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


All times are GMT -4. The time now is 05:56 PM.


.