Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding images to WebIQ project folder

Adding images to WebIQ project folder

akrosis
Established Member

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.  

5 REPLIES 5

webiq-sk
Frequent Contributor

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?

akrosis
Established Member

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.

Sgilk
Frequent Contributor

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. 

Serving data to WebIQ via HTTP 

CodeShepherd
Community Moderator
Community Moderator

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.

akrosis
Established Member

We might try this in next weeks, I'll post the results if we do. Thanks for the help. 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist