The Newer model of Sinexcel PWS2-30 uses Modbus protocol V120. There are many, many changes between this and the one currently existing in OpenEMS. We have been updating this. We have hit one big problem:
Active & Reactive power have had their signs reversed. Fixing this is not trivial to us Java newbies. Can anyone suggest the code to achieve this please?
Lines 552 - 554
After some looking I have decrypted the somewhat cryptic constants in the java code.
The one we needed was SCALE_FACTOR_2_AND_INVERT, where INVERT refers to changing the sign, that is, multiplying my -1.
BTW: FACTOR_2 refers to 10^2, a scaling of 100. Adding to the confusion, FACTOR_MINUS2 refers to 10^-2, or 1/100 scaling. I think these could have been named better, but that’s just me