Hello all, We are working on a project in which we'll have 300-500 images. So simply hard coding it to hmi or PLC is not our best option. What we thought is to have a string variable, and PLC will write the changeble part of the Image to that variable. For example, if that variable is xxx1.png, image should change to "pics/custom/xxx1.png". I'm trying to do it using local script but I'm not completely sure what I'm doing and I'd definetly use some help about it. I also couldn't figure it out if we have to use composites or just local script and image changer would work. Normally I wouldn't ask this but if someone provide some example codes it would be really great. You can also see some codes I've tried to do in below, which could be completely faulty. Thank you very much for your support. module.run = function (self) { // Get reference to Image Changer widget let ic = shmi.getControlByName("iq-image-changer"); // Get variable value let itemValue = shmi.getInputValue('inputDeneme'); // Define image paths object let images = { "1": "pics/custom/parca_Yan_isaretli.png", "2": "pics/custom/parca_ust_isaretli.png" }; // Set image source path let imagePath = images[itemValue]; // Call setCompositePlaceholders to update image source shmi.setCompositePlaceholders(ic, { "imageSource": imagePath });
... View more