FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
03-22-2024 06:10 PM
Hello All,
We're trying to display an image, based on the part number thats being used. So if part number changes, image should also change.
Right now, we are passing a name variable from PLC. And with a localscript, when that variable changes we change the image path. For example, pics/custom/XXX.png , if variable from PLC is "XXY", it becomes .../XXY.png.
Issue is, PLC is reading that part number from an outside source, and it can be anything. So, when a new part number comes, PLC reads and sends it, but since there isn't any image named like that in WebIQ project folder, it doesn't show anything.
Is there a way to access that "pics/custom" folder from a PC, like mapping a network drive, or another way? If so, we can ask line engineers and operators to just copy their images, whenever they require, or periodically etc.
Another idea we have is to access directly a folder from server, and we can just show those, but I'm not sure if we can enter a location url to image path, outside of workspace of project.
We also have a PC for another process, but we can implement something like copying images from server and writing to WebIQ project folder. But that is just another way of impelementing my first suggestion so, if it is possible, this can work too.
Thanks for all the help.
03-25-2024 08:37 AM
Please note that my answers have nothing to do with WebIQ here, but are valid for any other website as well:
1. You can detect if an image could not be loaded using JavaScript
2. If you'd try to use a local URL like file:///C:/Users/username/Downloads/icon-2024-150x150@2x.png in your HMI it will not work because:
a) a webbrowser does not allow local access for security reasons
b) That path would be local to ANY HMI user, not from the server, i.e. if you'd open the HMI from a tablet it would never work as even tha path c:\ does not exist there
I don't understand on what you're trying to achieve here, can you please elaborate on what you are trying to achieve rather than the solution you are thinking about. Is it about users uploading new images through the HMI?
03-28-2024 09:22 PM
There is no issue about detecting an image is loaded, or if a web browser can access a local URL.
We're trying to display an image, based on the part number of the item thats being produced on station. So if part number changes, image should also change. Issue is, PLC is getting that part number from an outside source. So, when a new part with new number comes, image should change. But since there isn't any image named like that in WebIQ project folder, it wouldn't show anything. To prevent this, a new image should be uploaded to WebIQ project workspace, before that new part is being produced.
But, we want a program that runs without requiring an PLC programmer to connect to PLC and upload images to WebIQ project. If there is a simple way, like my examples, we can teach it to line engineers or operators, so when a new type is introduced, they can just upload images and station should continue.
I sincerely hope I made it clear and hope you can understand it better now. Thank you.
04-01-2024 02:55 PM
Hi @akrosis ,
I think this is related but not exactly what you are looking for. In this video, I describe how to provide image & video data to a WebIQ project from a remote web server.
04-02-2024 09:17 AM
You could also consider using a PC based version of the WebIQ server instead of ctrlX CORE based. I guess access to PC storage should be way easier in that case.
04-16-2024 01:08 AM
We might try this in next weeks, I'll post the results if we do. Thanks for the help.