09.08.2022, 08:14
Changing units via grp.create will require UI reload for new units to appear.
You can use string data type instead of floating point for value display:
You can use string data type instead of floating point for value display:
Code:
value = r1 * 0x1000000000000 + r2 * 0x100000000 + r3 * 0x10000 + r4
if value > 999 then
units = 'MWh'
value = value / 1000000
else
units = 'KWh'
value = value / 1000
end
value = string.format('%.3f', value) .. units
grp.checkupdate('32/1/54', value)