I need some help with displaying an image (test.png) on my device. Initially, showing the image is straightforward. However, I want to be able to update the image dynamically. My goal is to send updated files via FTP to the device, and have the display automatically show the latest version of the image. All images will be sent with the same name (e.g., test.png).
Currently, I can see the updated image after sending it via FTP and performing a warm restart, but I'd like to achieve this in runtime, without having to restart the display or application. Does anyone have suggestions on how to implement this?
Thanks in advance!
Last edit: yoeri 2024-10-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
I need some help with displaying an image (test.png) on my device. Initially, showing the image is straightforward. However, I want to be able to update the image dynamically. My goal is to send updated files via FTP to the device, and have the display automatically show the latest version of the image. All images will be sent with the same name (e.g., test.png).
Currently, I can see the updated image after sending it via FTP and performing a warm restart, but I'd like to achieve this in runtime, without having to restart the display or application. Does anyone have suggestions on how to implement this?
Thanks in advance!
Last edit: yoeri 2024-10-21
Should work by using the property Dynamic bitmap - Bitmap version.
Change the value of the variable you linked to this property after you updated the image.
See:
https://content.helpme-codesys.com/en/CODESYS%20Visualization/_visu_elem_image.html
Works like a charm. I have added a counter which ups the Bitmap version by 1 each second and it refreshes nicely. Thank you Tim!