You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
retrieved data from EPSolar solar charge controller is not correct
Steps to Reproduce:
Compile the included example
Expected Result:
code should print data from
chargingEquipmentOutputVoltage = 0x3104
dischargingEquipmentOutputVoltage = 0x310C
and 32bit value from
dischargingEquipmentOutputPower = 0x310e + 0x310f
Actual Result:
a)
getResponseBuffer(0xC0) is not valid, as only 16 registers were requested. The correct offset from 0x3100 is +0x0C
b)
offset 0x0D and 0x0E don't fit together.
0x3100 + 0x0D is the dischargingEquipmentOutputCurrent and is a single 16bit value.
if you consider "Pload" as beeing dischargingEquipmentOutputPower than you should use the offset 0x0E and 0x0f.
Furthermore, the shift of 16 bits will need a cast on the Arduino Mega.
ModbusMaster version
2.0.0
Arduino IDE version
1.8.13
Arduino Hardware
Arduino Mega
Platform Details
W10
Scenario:
retrieved data from EPSolar solar charge controller is not correct
Steps to Reproduce:
Compile the included example
Expected Result:
code should print data from
chargingEquipmentOutputVoltage = 0x3104
dischargingEquipmentOutputVoltage = 0x310C
and 32bit value from
dischargingEquipmentOutputPower = 0x310e + 0x310f
Actual Result:
a)
getResponseBuffer(0xC0) is not valid, as only 16 registers were requested. The correct offset from 0x3100 is +0x0C
b)
offset 0x0D and 0x0E don't fit together.
0x3100 + 0x0D is the dischargingEquipmentOutputCurrent and is a single 16bit value.
if you consider "Pload" as beeing dischargingEquipmentOutputPower than you should use the offset 0x0E and 0x0f.
Furthermore, the shift of 16 bits will need a cast on the Arduino Mega.
Feature Request
consider something like:
Serial.print("Vbatt: "); Serial.println(node.getResponseBuffer(0x04)/100.0f); Serial.print("Vload: "); Serial.println(node.getResponseBuffer(0x0C)/100.0f); // adopted Serial.print("Pload: "); Serial.println((node.getResponseBuffer(0x0E) + ((uint32_t)node.getResponseBuffer(0x0F) << 16))/100.0f); // cast and brackets
The text was updated successfully, but these errors were encountered: