This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

acces to LM standard directories and files
#3
Hi,

You probably want to change the image source dynamic on a KNX value, you can do that like this:

1) Add a few icons to the icons tab, and name them icon_1.png, icon_2.png, icon_3.png etcetera
2) Add a byte object (40/1/15 in this sample)
3) Add a image element to the visu with a additional class (in the sample it's "icoon" and don't use "icon" as its a default used class) 
4) Use this custom JS to make it happen
Code:
$(function(){
 if (typeof grp != 'undefined') {
   grp.listen('40/1/15', function(object, state) {
     $('.icoon').find('img').attr('src', '/scada/resources/img/icon_' + object.value + '.png')
   }, true);
 }
});
BR,

Erwin
Reply


Messages In This Thread
RE: acces to LM standard directories and files - by Erwin van der Zwart - 26.03.2018, 07:59

Forum Jump: