I am looking into a more modular way to work with the HMI:
In my code I would have a dictionary type of array
aHL[0].sOption1Text := ‘Go to\
Power Page’;
aHL[0].sOption1Url:='https://192.168.14.114/ehmi/hmiapp.html?HmiPage=eltek.json’;
aHL[1].sOption1Text := ‘Go to\
Safety Page’;
aHL[1].sOption1Url:='https://192.168.14.114/ehmi/hmiapp.html?HmiPage=safety.json’;
And then define which part of the dictionary to use:
IF eHandlerVal = eHandler#Power THEN sHL := aHL[0];
ELSIF eHandlerVal = eHandler#SafetyRelay THEN sHL := aHL[1]; END_IF;
With this the hope is that I only have one button defined in HMI and it can load a page internally for me and I can just update my dictionary with more and more options.
My questions are:
- Even though its set to open the same window it opens a new page, so I am likely to end up with many windows open - is there a way to force it to really be the same window?
- The url stays at my hard coded state (so even if I click to go to the home page from safety page it does go to the home page but the url is still 'https://192.168.14.114/ehmi/hmiapp.html?HmiPage=safety.json’ → I think this means that if you reload the page it jumps back here now → how can I ‘clear’ the url neatly?
- The back button does not allow me to use it but I think probably because of my url method.. I’m mostly ok with that.
- Finally, is there already hmi modular functionality like this that I’ve just missed?
Thanks!
