Is my first scrip, help is very welcome:
powerin = grp.getvalue('1/1/2')
powerout = grp.getvalue('3/1/5')
COP = powerout / powerin
grp.write ('4/1/1', COP)
There should be an "IF" in. The COP should only be calculated if the powerout is bigger than 0 becouse powerout can be up to -7000W heat power and COP should be 0 in that case (is already written to a defreezing obiject by the counter itself so "-" values are to ignoere).
powerin = grp.getvalue('1/1/2')
powerout = grp.getvalue('3/1/5')
COP = powerout / powerin
grp.write ('4/1/1', COP)
There should be an "IF" in. The COP should only be calculated if the powerout is bigger than 0 becouse powerout can be up to -7000W heat power and COP should be 0 in that case (is already written to a defreezing obiject by the counter itself so "-" values are to ignoere).