Open SlyRemarks opened 4 years ago
Reported by Robert Wall.
His proposed solution:
Make use of the call EmonLibCM_acPresent( ), add a variable assumedVrms with a value of 240.0 (settable via the configuration options) and do as is done for the emonPiCM:
if (EmonLibCM_acPresent()) { emonPi.power1 = EmonLibCM_getRealPower(0); // Copy the desired variables ready for transmission emonPi.power2 = EmonLibCM_getRealPower(1); emonPi.power1_plus_2 = emonPi.power1 + emonPi.power2; emonPi.E1 = EmonLibCM_getWattHour(0); emonPi.E2 = EmonLibCM_getWattHour(1); } else { emonPi.power1 = assumedVrms * EmonLibCM_getIrms(0); // Copy the desired variables ready for transmission emonPi.power2 = assumedVrms * EmonLibCM_getIrms(1); emonPi.power1_plus_2 = emonPi.power1 + emonPi.power2; emonPi.E1 += assumedVrms * EmonLibCM_getIrms(0) * EmonLibCM_getDatalog_period()/3600.0; emonPi.E2 += assumedVrms * EmonLibCM_getIrms(1) * EmonLibCM_getDatalog_period()/3600.0; } emonPi.Vrms = EmonLibCM_getVrms() * 100;
A Vrms value of zero will indicate to the user that apparent power is being reported.
Reported by Robert Wall.
His proposed solution:
Make use of the call EmonLibCM_acPresent( ), add a variable assumedVrms with a value of 240.0 (settable via the configuration options) and do as is done for the emonPiCM:
A Vrms value of zero will indicate to the user that apparent power is being reported.