Hi all,
I've managed to write a small web page with buttons and icons that let me switch between scenarios.
I'm now trying to setup a input field for changing morning wake-up time.
I was able to add new variable format for reading, but I have no clue of how to decode HH:MM format to DINT before writing it back to PLC.
Any hint is appreciated!!
Regards, Luca
P.S.: On the reading side i added the "TOD" datatype to jquery.e-dom.2.0.js:
if (CurrentField.attr('data-valuetype')==='TOD') {
CurrentField.bind('OnReadSuccess', function(event, data){
if (data>86399999) {data-=0;};
CurrentField.html('<p>'+Math.floor(data/3600000)+':'+Math.floor((data%3600000)/60000)+'</p>');
return false;
})
}
TOD is actually a DINT containing the number of millisecond from midnight, and 86399999 is the value reached at 23:59:59.999